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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Apr 23 11:40:15 CEST 2023


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #150114|0                           |1
        is obsolete|                            |

--- Comment #3 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 150116
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150116&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

Signed-off-by: David Nind <david at davidnind.com>
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