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

Fixes the missing sort call in add_sorting_to_solr (#5905). #5920

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

bwatson78
Copy link
Contributor

Fixes #5905 ; refs #5905

Because our override method never calls Blacklight::SearchBuilder#sort, it will always default to title_si asc, making the sort options useless on this show page.

Changes proposed in this pull request:

  • Adds the missing sort command to the method that overrides one from Blacklight::Solr::SearchBuilderBehavior.
  • Inserts a test to confirm that a sort option passed into the blacklight_params actually gets utilized.

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • Login and visit Dashboard
  • Choose Collections and select one with multiple works to navigate to the show page
  • Choose any sort option from the pull down menu
  • After page load, the order of the works should be different

@samvera/hyrax-code-reviewers

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

app/search_builders/hyrax/collection_search_builder.rb Outdated Show resolved Hide resolved
Co-authored-by: Chris Colvard <chris.colvard@gmail.com>
@dlpierce dlpierce merged commit 7356ffe into main Nov 30, 2022
@dlpierce dlpierce deleted the fix_add_sorting_to_solr_method_5905 branch November 30, 2022 14:40
@dlpierce dlpierce added the notes-bugfix Release Notes: Fixed a bug label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-bugfix Release Notes: Fixed a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot sort the works under a collection
3 participants