Comment 6 for bug 1943744

Revision history for this message
Steven Mayo (stmayo) wrote (last edit ):

Branch: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/smayo/LP1943744-Staff_Catalog_Preferences_Include_Checkboxes_And_Sort_Order

Added 3 new workstation settings for default values for Sort Order, Limit to Available, and Group Formats/Editions. Didn't include Results from All Libraries, because... wouldn't you just set your search org higher? Am I missing something about how stuff works?
Will add a new setting for that too if people want it.

There are new rows on the Search Preferences page to modify each of these.

Pulled the Sort Results dropdown into its own component, sort-order-select, so that it will stay the same despite being in more than one place now. That component is used in the search form and the search preferences.

Added a check to the Catalog Service that applies your defaults if you haven't clicked it yourself. It took longer than I expected to wrangle the checkboxes into not always using the default without ignoring it entirely. Had to force the URL to always include the checkboxes to do that.

Spent longer than I expected on this, but it's been a busy month, and making a new component took some learning about Angular. My brain has embiggened.

Steps to Test:
[1] Go to Cataloging -> Search the Catalog
[2] Observe that Sort Results is 'Sort by Relevance' and the 'Limit to Available' and 'Group Formats/Editions' checkboxes are unchecked.
[3] Go to Search Preferences
[4] Observe the new Default Sort Order, Default Limit to Available, and Default Group Formats/Editions rows
[5] Set a new Default Sort Order and check one or both of the default checkboxes. You should receive a success toast.
[6] Reset the search to the default state - go back to the home page and go back to search again OR manually remove all the parameters from your URL
[6.1] If you search immediately from the preferences page instead, it should search using the values in your search bar instead of the defaults
[7] Observe that Sort Results, Limit to Available, and Group Formats/Editions are as you set the preferences
[8] Click on a search result and then click on the 'Back to Results' button
[9] Ensure the search bar is as you left it
[10] Modify the dropdown and checkboxes and search again
[11] Click on a search result and then click on the 'Back to Results' button
[12] Ensure the search bar is as you left it
[13] Go to Search Preferences again
[14] Ensure the search bar is as you left it