]> git.koha-community.org Git - koha.git/commit
Bug 30327: Add options for sorting components
authorNick Clemens <nick@bywatersolutions.com>
Wed, 1 Jun 2022 14:40:49 +0000 (14:40 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 29 Jul 2022 16:33:03 +0000 (16:33 +0000)
commit488c1a71c903c41af637872f9452bed4f58f929f
treea0cb5c118b2bc82acc792a3fd55ea1320b0fb091
parent84999e19380fffea3e0be25493a86fcb03ee7453
Bug 30327: Add options for sorting components

This patch adds two new sysprefs:
 ComponentSortField
 ComponentSortOrder

These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components

This also updates our search from simple_search_compat to search_compat to allow for sorting options

Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that

To test:
 1 - Enable UseControlNumber (or not)
 2 - Add some components to a record by control number or title depending on above
 3 - Enable  ShowComponentRecords  syspref
 4 - View the record that has components
 5 - Note they are not sorted
 6 - Apply patch, updatedatabase
 7 - reload record
 8 - Note components are sorted by title ascending
 9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de63c2abb1a64fae45ebbfa98c5001b98f4a69ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Biblio.pm
catalogue/detail.pl
installer/data/mysql/atomicupdate/bug_30327_add_sortComponents_syspref.pl [new file with mode: 0755]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
opac/opac-detail.pl
t/db_dependent/Koha/Biblio.t