[Koha-bugs] [Bug 33569] Order by relevance many not be visible

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 20 20:29:22 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33569

--- Comment #1 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 149984
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149984&action=edit
Bug 33569: Fix sort by relevance in catalog search

When ordering catalog search by relevance from advanced search, this is not
visible in sort order combobox in staff interface.

This is because sort by relevance is a special case not using sort
order.
This patch add a new method C4::Context->default_catalog_sort_by to use
in both staff interface and OPAC.

Test plan :
1.0) On staff interface
1.1) Define system preferences defaultSortField = 'relevance' and
defaultSortOrder = 'descending'
1.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected (with a check icon)
1.3) Perform an advanced search on any term, ie 'perl', with sort by relevance
=> Without patch : you see in sort combobox 'relevance' not selected (no check
icon)
=> With patch : you see in sort combobox 'relevance' selected (with a check
icon)
2.0) On OPAC
2.1) Define system preferences OPACdefaultSortField = 'relevance' and
OPACdefaultSortOrder = 'descending'
2.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected
3.0) Run prove t/Context.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list