Bug 36982 - Collections facet does not get alphabetized based on collection descriptions
Summary: Collections facet does not get alphabetized based on collection descriptions
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lari Strand
QA Contact: Lucas Gass
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-29 10:45 UTC by Lari Strand
Modified: 2024-07-19 09:45 UTC (History)
4 users (show)

See Also:
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 (1.40 KB, patch)
2024-05-29 11:02 UTC, Lari Strand
Details | Diff | Splinter Review
Bug 36982: Collections facet does not get alphabetized based on collection descriptions (1.44 KB, patch)
2024-05-30 21:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 36982: Collections facet does not get alphabetized based on collection descriptions (1.50 KB, patch)
2024-06-26 13:14 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 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