Summary: | OPACShowUnusedAuthorities displays unused authorities regardless | ||
---|---|---|---|
Product: | Koha | Reporter: | Esther Melander <esther.melander> |
Component: | OPAC | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | Pushed to oldstable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas, nick, phil |
Version: | 23.11 | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37069 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes authority searching in the OPAC. Using the OPACShowUnusedAuthorities system preference now works as expected when using Zebra and Elasticsearch search engines:
- if set to "Show", unused authorities are shown in the search results
- if set to "Don't show", unused authorities are not shown in the search results.
A regression was causing unused authorities to show in the search results when the system preference was set to "Don't show".
|
Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
Circulation function: | |||
Bug Depends on: | 12478 | ||
Bug Blocks: | |||
Attachments: |
Bug 37057: Restore filtering of unused authorities
Bug 37057: Restore filtering of unused authorities Bug 37057: Restore filtering of unused authorities |
Description
Esther Melander
2024-06-07 17:44:38 UTC
That would be from bug 12478 in https://git.koha-community.org/Koha-community/Koha/commit/0002bbc72a42b4c4223e20c66ef032c20f48ba19 - apparently at one point, Elasticsearch hadn't yet implemented authority usage counts, so they just commented out the whole OPACShowUnusedAuthorities feature for ES and Zebra, and left it that way. Created attachment 167629 [details] [review] Bug 37057: Restore filtering of unused authorities Bug 12478 commented this code out, however, we do return the 'used' parameter in ES authority searches. While we should implement the feature for both ES and Zebra as an index, we can restore this behaviour here. To test: 1 - Search authorities on OPAC with SearchEngine syspref set to both Elasticsearch and Zebra I just searched for 'a' 2 - Confirm results with no usage are included 3 - Test with both values of OPACShowUnusedAuthorities 4 - Apply patch 5 - Repeat searches with both engines and syspref settings 6 - Confirm unused authorities not shown in either engine when syspref is "Don't show" 7 - Conifrm unused authorities shown in both engines when syspref is "Show" Created attachment 167705 [details] [review] Bug 37057: Restore filtering of unused authorities Bug 12478 commented this code out, however, we do return the 'used' parameter in ES authority searches. While we should implement the feature for both ES and Zebra as an index, we can restore this behaviour here. To test: 1 - Search authorities on OPAC with SearchEngine syspref set to both Elasticsearch and Zebra I just searched for 'a' 2 - Confirm results with no usage are included 3 - Test with both values of OPACShowUnusedAuthorities 4 - Apply patch 5 - Repeat searches with both engines and syspref settings 6 - Confirm unused authorities not shown in either engine when syspref is "Don't show" 7 - Conifrm unused authorities shown in both engines when syspref is "Show" Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. I used the word 'central' to show used and unused terms on the search results. 2. The pagination for OPAC authority search results is currently not working (not because of this bug). If you try and navigate to the next page of results, it just returns you to the authority search form. I have logged Bug 37086 for this. Created attachment 168271 [details] [review] Bug 37057: Restore filtering of unused authorities Bug 12478 commented this code out, however, we do return the 'used' parameter in ES authority searches. While we should implement the feature for both ES and Zebra as an index, we can restore this behaviour here. To test: 1 - Search authorities on OPAC with SearchEngine syspref set to both Elasticsearch and Zebra I just searched for 'a' 2 - Confirm results with no usage are included 3 - Test with both values of OPACShowUnusedAuthorities 4 - Apply patch 5 - Repeat searches with both engines and syspref settings 6 - Confirm unused authorities not shown in either engine when syspref is "Don't show" 7 - Conifrm unused authorities shown in both engines when syspref is "Show" Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks for the quick fix Nick.. all working as expected again now. Passing QA Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 |