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>