From 454c2783b923123f263266e954d852956f5c1c19 Mon Sep 17 00:00:00 2001 From: Richard Higgins Date: Thu, 20 Aug 2026 17:30:20 -0400 Subject: [PATCH 1/2] Fix bug by ensuring requestable items process can see repository name/id --- app/models/solr_document.rb | 4 ++++ lib/um_arclight/traject/ead2_component_config.rb | 3 +++ 2 files changed, 7 insertions(+) diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index f88c6ef..6f45687 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -30,6 +30,10 @@ def collection_creator fetch("collection_creator_ssm", [])[0] end + def repository + first("repository_ssm") || first("repository_ssim") || collection&.first("repository_ssm") + end + def repository_id repository_config&.slug end diff --git a/lib/um_arclight/traject/ead2_component_config.rb b/lib/um_arclight/traject/ead2_component_config.rb index 0f1057f..dc459e0 100644 --- a/lib/um_arclight/traject/ead2_component_config.rb +++ b/lib/um_arclight/traject/ead2_component_config.rb @@ -158,6 +158,9 @@ to_field "repository_ssim" do |_record, accumulator, _context| accumulator << settings[:root].clipboard[:repository] end +to_field "repository_ssm" do |_record, accumulator, _context| + accumulator << settings[:root].clipboard[:repository] +end to_field "collection_ssim" do |_record, accumulator, _context| accumulator.concat settings[:root].output_hash["normalized_title_ssm"] From 4ba2883a7ac5557b2e2d9107a14fe27e814ea2b6 Mon Sep 17 00:00:00 2001 From: Richard Higgins Date: Fri, 21 Aug 2026 11:11:31 -0400 Subject: [PATCH 2/2] Copied repository settings wrt content.clipboard into eead2 components config --- lib/um_arclight/traject/ead2_component_config.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/um_arclight/traject/ead2_component_config.rb b/lib/um_arclight/traject/ead2_component_config.rb index dc459e0..946d51a 100644 --- a/lib/um_arclight/traject/ead2_component_config.rb +++ b/lib/um_arclight/traject/ead2_component_config.rb @@ -32,6 +32,13 @@ provide "component_identifier_format", "%s_%s" end +each_record do |_record, context| + next unless settings["repository"] + context.clipboard[:repository] = Arclight::Repository.find_by( + slug: settings["repository"] + ).name +end + NAME_ELEMENTS = %w[corpname famname name persname].freeze SEARCHABLE_NOTES_FIELDS = %w[