From 0611776612f746c60b422cad7a6abe187350d53c Mon Sep 17 00:00:00 2001 From: Nathan <14874992+nwalker2398@users.noreply.github.com> Date: Thu, 30 May 2024 10:20:06 -0400 Subject: [PATCH] Achydra 881 (#281) * WIP adding parent_jounal field * linked library_partner usage statistics form field to parent_journal_ssi, indexed as 'parent_publication-1:parent_publication_is_partner_journal = TRUE' * Updated tests to comply with ci * updated reference of parent_journal_ssi to partner_journal_ssi --- app/forms/usage_statistics_reports_form.rb | 25 +++++++++++----------- app/models/solr_document.rb | 1 + spec/fixtures/fedora_objs/mods.xml | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/forms/usage_statistics_reports_form.rb b/app/forms/usage_statistics_reports_form.rb index dc89a121..6a9f7109 100644 --- a/app/forms/usage_statistics_reports_form.rb +++ b/app/forms/usage_statistics_reports_form.rb @@ -4,18 +4,19 @@ class UsageStatisticsReportsForm < FormObject TIME_PERIOD_OPTIONS = ['date_range', 'lifetime'].freeze FILTERS = { - 'Author Name' => SolrDocument.field_semantics[:author], - 'UNI' => SolrDocument.field_semantics[:author_id], - 'Year' => SolrDocument.field_semantics[:date], - 'Genre' => SolrDocument.field_semantics[:genre], - 'Subject' => SolrDocument.field_semantics[:subject], - 'Resource Type' => SolrDocument.field_semantics[:resource_type], - 'Organization' => SolrDocument.field_semantics[:organization], - 'Department' => SolrDocument.field_semantics[:department], - 'Degree Level' => SolrDocument.field_semantics[:degree_level], - 'Series' => SolrDocument.field_semantics[:columbia_series], - 'Non CU Series' => SolrDocument.field_semantics[:non_columbia_series], - 'CUL DOI' => SolrDocument.field_semantics[:id] + 'Author Name' => SolrDocument.field_semantics[:author], + 'UNI' => SolrDocument.field_semantics[:author_id], + 'Year' => SolrDocument.field_semantics[:date], + 'Genre' => SolrDocument.field_semantics[:genre], + 'Subject' => SolrDocument.field_semantics[:subject], + 'Resource Type' => SolrDocument.field_semantics[:resource_type], + 'Organization' => SolrDocument.field_semantics[:organization], + 'Department' => SolrDocument.field_semantics[:department], + 'Degree Level' => SolrDocument.field_semantics[:degree_level], + 'Series' => SolrDocument.field_semantics[:columbia_series], + 'Non CU Series' => SolrDocument.field_semantics[:non_columbia_series], + 'Library Partner' => SolrDocument.field_semantics[:library_partner], + 'CUL DOI' => SolrDocument.field_semantics[:id] }.freeze ORDER = { diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index 55864a3a..fd0ccaec 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -43,6 +43,7 @@ class SolrDocument degree_level: 'degree_level_name_ssim', degree_grantor: 'degree_grantor_ssim', degree_discipline: 'degree_discipline_ssim', + library_partner: 'partner_journal_ssi', columbia_series: 'series_ssim', # Only columbia series. non_columbia_series: 'non_cu_series_ssim', thesis_advisor: 'thesis_advisor_ssim', diff --git a/spec/fixtures/fedora_objs/mods.xml b/spec/fixtures/fedora_objs/mods.xml index 4909c2f0..9e652fdf 100644 --- a/spec/fixtures/fedora_objs/mods.xml +++ b/spec/fixtures/fedora_objs/mods.xml @@ -65,6 +65,7 @@ Bildungsromans + Project Gutenberg