diff --git a/.ruby-version b/.ruby-version index 75a22a26..fd2a0186 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.3 +3.1.0 diff --git a/lib/traject/pdc_describe_indexing_config.rb b/lib/traject/pdc_describe_indexing_config.rb index bd86a7af..93c144c7 100644 --- a/lib/traject/pdc_describe_indexing_config.rb +++ b/lib/traject/pdc_describe_indexing_config.rb @@ -144,6 +144,8 @@ to_field 'issue_date_ssim', extract_xpath("/hash/resource/publication-year") +to_field 'year_available_itsi', extract_xpath("/hash/resource/publication-year") + to_field 'pdc_created_at_dtsi', extract_xpath('/hash/created-at') to_field "issue_date_strict_ssi" do |record, accumulator, _context| diff --git a/spec/system/search_pdc_results_page_spec.rb b/spec/system/search_pdc_results_page_spec.rb index 5d2b8fae..1a63be63 100644 --- a/spec/system/search_pdc_results_page_spec.rb +++ b/spec/system/search_pdc_results_page_spec.rb @@ -33,5 +33,10 @@ expect(page).to have_content("System Studies") click_on("System Studies") expect(page).to have_content("Fusion Pilot Plant performance and the role of a Sustained High Power Density tokamak") + + click_on "Year Published" + expect(page).to have_content "View larger" + expect(page).not_to have_content "[Missing]" + expect(page).to have_content "2022\n2022" end end