Bug 36982

Summary: Collections facet does not get alphabetized based on collection descriptions
Product: Koha Reporter: Lari Strand <lmstrand>
Component: Searching - ElasticsearchAssignee: Lari Strand <lmstrand>
Status: Pushed to oldstable --- QA Contact: Lucas Gass (lukeg) <lucas>
Severity: normal    
Priority: P5 - low CC: david, fridolin.somers, lucas, nick, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the display of the 'Collections' facet for search results in the staff interface and OPAC when using Elasticsearch and Open Search. Values for the facet are now sorted alphabetically using the CCODE authorized values' descriptions, instead of the authorized values' codes.
Version(s) released in:
24.11.00,24.05.02,23.11.07
Circulation function:
Attachments: Bug 36982: Collections facet does not get alphabetized based on collection descriptions
Bug 36982: Collections facet does not get alphabetized based on collection descriptions
Bug 36982: Collections facet does not get alphabetized based on collection descriptions

Description Lari Strand 2024-05-29 10:45:24 UTC
Collections facet should use the CCODE authorized values' descriptions when sorting.
Comment 1 Lari Strand 2024-05-29 11:02:21 UTC
Created attachment 167237 [details] [review]
Bug 36982: Collections facet does not get alphabetized based on collection descriptions

Collections facet should use the CCODE authorized values' descriptions when sorting.
    
    To test:
    1) Do a search and check how the collections facet is alphabetized based on the auth value CCODE code when syspref FacetOrder is set to Alphabetically.
    2) Apply patch
    3) Check that the collections are now alphabetized by the location descriptions.
    4) Sign off
Comment 2 David Nind 2024-05-30 21:21:40 UTC
Created attachment 167292 [details] [review]
Bug 36982: Collections facet does not get alphabetized based on collection descriptions

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-05-30 21:33:47 UTC
Testing notes (using KTD):

1. I added a new authorized value for CCODE:
   . ORC with description 'Some other collection code'
2. Edit a record so that it uses this new collection code
  (I edited CGI programming with Perl (11))
3. Search in the OPAC and staff interface so that it returns results that use include multiple collection codes (I searched for perl).
4. Before the patch, the Collections facet values are listed alphabetically using the CCODE authorized value instead of the description):
    Some other collection code
    Reference
5. After the patch, the Collections facet values are listed alphabetically using the CCODE description):
    Reference
    Some other collection code
Comment 4 Lucas Gass (lukeg) 2024-06-26 13:14:29 UTC
Created attachment 168143 [details] [review]
Bug 36982: Collections facet does not get alphabetized based on collection descriptions

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Katrin Fischer 2024-06-27 09:52:47 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Lucas Gass (lukeg) 2024-07-18 20:36:32 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 7 Fridolin Somers 2024-07-19 09:45:44 UTC
Pushed to 23.11.x for 23.11.07
Comment 8 Wainui Witika-Park 2024-09-17 03:16:56 UTC
Not backporting to 23.05 unless requested