Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: APPS-2471 Add a "Related Records" metadata fieldadd related record field #1131

Merged
merged 5 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class CatalogController < ApplicationController
config.add_show_field 'resp_statement_tesim', label: 'Statement of Responsibility'
config.add_show_field 'citation_source_tesim', label: 'References'
config.add_show_field 'related_to_ssm', label: 'Related Items', auto_link: true # make this field url aware
config.add_show_field 'human_readable_related_record_title_ssm', label: 'Related Records'

# Physical description
config.add_show_field 'medium_tesim', label: 'Medium'
Expand Down
1 change: 1 addition & 0 deletions config/metadata/note_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ colophon_tesim: 'Colophon'
provenance_tesim: 'Provenance'
note_tesim: 'Note'
related_to_ssm: 'Related items'
human_readable_related_record_title_ssm: 'Related records'
# toc_tesim: 'Table of Contents' (render_table_of_contents_key / value)
resp_statement_tesim: 'Statement of Responsibility'
citation_source_tesim: 'References'
Expand Down
1 change: 1 addition & 0 deletions config/oai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ DC:
description:
- content_disclaimer_ssm
- related_to_ssm
- related_record_ssm
DPLA:
parent_schema: default
object:
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"interviewer_tesim", "interviewee_tesim", "cartographer_tesim",
"artist_tesim", "recipient_tesim", "director_tesim", "producer_tesim", "host_tesim",
"musician_tesim", "printer_tesim", "researcher_tesim",
'format_book_tesim', 'resp_statement_tesim', 'citation_source_tesim', 'related_to_ssm', "oai_set_ssim"]
'format_book_tesim', 'resp_statement_tesim', 'citation_source_tesim', 'related_to_ssm', 'human_readable_related_record_title_ssm', "oai_set_ssim"]
end

it 'has exactly expected show fields' do
Expand Down
7 changes: 6 additions & 1 deletion spec/presenters/ursus/note_metadata_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'provenance_tesim' => 'Provenance',
'note_tesim' => 'Note',
'related_to_ssm' => 'Related items',
'human_readable_related_record_title_ssm' => 'Related records',
'resp_statement_tesim' => 'Statement of Responsibility',
'citation_source_tesim' => 'References',
'incipit_tesim' => 'Incipit',
Expand Down Expand Up @@ -63,6 +64,10 @@
expect(config['related_to_ssm'].to_s).to eq('Related items')
end

it 'returns the Related records Key' do
expect(config['human_readable_related_record_title_ssm'].to_s).to eq('Related records')
end

it 'returns the Statement of Responsibility Key' do
expect(config['resp_statement_tesim'].to_s).to eq('Statement of Responsibility')
end
Expand All @@ -86,7 +91,7 @@

it "returns existing keys" do
expect(presenter_object.note_terms).to be_instance_of(Hash)
expect(all).to eq 12
expect(all).to eq 13
expect(config.length).to eq all
end

Expand Down
Loading