]> 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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Sat, 25 Jun 2022 18:25:18 +0000 (15:25 -0300)
commitde63c2abb1a64fae45ebbfa98c5001b98f4a69ae
treecaa4c6fd0c3062e4aab058412b7fcdbdb3590f2c
parentfde9f39ca56bacd8a7f300a105ea6dfde14d0fd9
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>
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