[Koha-bugs] [Bug 30327] Sort component parts
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Oct 12 15:38:45 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30327
--- Comment #49 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 141731
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141731&action=edit
Bug 30327: [21.11.x] 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 at ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
Bug 30327: Fix tests
Corrected variable name on update to match everywhere else
Added a default value for limit in buildQuery and only append limit if it has
content
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
Bug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
This patch fetches the new sysprefs into variables, providing default title
ascending if
they are not set to avoid an undefined concatenation warning
I also make the update idempotent and fix confusion of plural/singular names
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list