Summary: | Add option to NOT redirect to result when search returns only one record | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | Searching | Assignee: | Aleisha Amohia <aleisha> |
Status: | RESOLVED FIXED | QA Contact: | Nick Clemens (kidclamp) <nick> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, cbrannon, david, dcook, fridolin.somers, kebliss, magnus, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=1610 | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Caroline Cyr La Rose | Documentation submission: | https://gitlab.com/koha-community/koha-manual/-/merge_requests/897 |
Text to go in the release notes: |
This enhancement to catalog searching enables choosing what happens for a single search result (for both the OPAC and staff interface): redirect to the record details page (the current behavour), or show only one result.
New system preference RedirectToSoleResult is used to manage this (enabled by default to match Koha's current behaviour).
|
Version(s) released in: |
24.05.00
|
Circulation function: | |||
Attachments: |
Bug 35728: Add ability to NOT redirect to result when search returns only one record
Bug 35728: Add RedirectToSoleResult system preference Bug 35728: Add ability to NOT redirect to result when search returns only one record Bug 35728: Add RedirectToSoleResult system preference Bug 35728: Add ability to NOT redirect to result when search returns only one record Bug 35728: Add RedirectToSoleResult system preference Bug 35728: Add ability to NOT redirect to result when search returns only one record |
Description
Aleisha Amohia
2024-01-08 22:47:46 UTC
Created attachment 160668 [details] [review] Bug 35728: Add ability to NOT redirect to result when search returns only one record This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result. To test: 1) Apply the patch, install database updates, restart services. 2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default. 3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page. 4) Do the same search on the OPAC. Confirm you are redirected to the detail page. 5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect" 6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected. Sponsored-by: Education Services Australia SCIS Hi Aleisha. I like this! It looks like the patch(es) with the database update/system preference addition is missing... David Testing notes (using KTD and the sample data): 1. Search for higher-order for a single search result. Created attachment 160722 [details] [review] Bug 35728: Add RedirectToSoleResult system preference Created attachment 160723 [details] [review] Bug 35728: Add ability to NOT redirect to result when search returns only one record This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result. To test: 1) Apply the patch, install database updates, restart services. 2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default. 3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page. 4) Do the same search on the OPAC. Confirm you are redirected to the detail page. 5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect" 6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected. Sponsored-by: Education Services Australia SCIS (In reply to David Nind from comment #2) > Hi Aleisha. > > I like this! > > It looks like the patch(es) with the database update/system preference > addition is missing... > > David Oops! There you go Created attachment 160724 [details] [review] Bug 35728: Add RedirectToSoleResult system preference Signed-off-by: David Nind <david@davidnind.com> Created attachment 160725 [details] [review] Bug 35728: Add ability to NOT redirect to result when search returns only one record This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result. To test: 1) Apply the patch, install database updates, restart services. 2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default. 3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page. 4) Do the same search on the OPAC. Confirm you are redirected to the detail page. 5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect" 6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> Would it make sense to split this in two, with one syspref for the OPAC and one for staff? *** Bug 25885 has been marked as a duplicate of this bug. *** (In reply to Magnus Enger from comment #8) > Would it make sense to split this in two, with one syspref for the OPAC and > one for staff? I don't think it is necessary at this point. The sponsorship we received didn't require this to be so granular, but it wouldn't be hard to split it out in future if that was desired. Created attachment 164214 [details] [review] Bug 35728: Add RedirectToSoleResult system preference Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 164215 [details] [review] Bug 35728: Add ability to NOT redirect to result when search returns only one record This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result. To test: 1) Apply the patch, install database updates, restart services. 2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default. 3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page. 4) Do the same search on the OPAC. Confirm you are redirected to the detail page. 5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect" 6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed for 24.05! Well done everyone, thank you! (In reply to Magnus Enger from comment #8) > Would it make sense to split this in two, with one syspref for the OPAC and > one for staff? +1 Not backported to 23.11.x |