Skip to content

Commit

Permalink
577 missing pub date (#578)
Browse files Browse the repository at this point in the history
* Adding year_available_itsi to pdc describe indexing configuration
This allows the publisj date to be part of the facet and removes the [missing] from the page

* added test to check for year published facet

---------

Co-authored-by: Carolyn Cole <[email protected]>
  • Loading branch information
JaymeeH and carolyncole authored Mar 7, 2024
1 parent 6ea9717 commit 848fc07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
3.1.0
2 changes: 2 additions & 0 deletions lib/traject/pdc_describe_indexing_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
5 changes: 5 additions & 0 deletions spec/system/search_pdc_results_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 848fc07

Please sign in to comment.