Koha/opac
Fridolin Somers 3bb7ea2dab
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@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:47 -03:00
..
clubs
errors
external/overdrive
sci
sco Bug 19188: Use the Price template plugin with_symbol => 1 2023-01-31 10:49:33 -03:00
svc
ilsdi.pl Bug 30944: Undo change to ILS-DI documentation 2022-10-03 13:44:11 -03:00
maintenance.pl
oai.pl
opac-account-pay-return.pl
opac-account-pay.pl
opac-account.pl
opac-addbybiblionumber.pl
opac-alert-subscribe.pl
opac-article-request-cancel.pl
opac-authorities-home.pl Bug 30036: Allow XSLT for authority results view in OPAC 2022-10-27 09:54:35 -03:00
opac-authoritiesdetail.pl Bug 29897: Display author's identifiers 2022-08-09 10:58:44 -03:00
opac-basket.pl Bug 33102: Display fields from biblioitems in OPAC/staff interface cart 2023-05-05 17:45:19 -03:00
opac-blocked.pl
opac-browse.pl
opac-browser.pl
opac-changelanguage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
opac-course-details.pl Bug 32445: (follow-up) Fix availability display on opac-course-details 2023-01-05 09:09:48 -03:00
opac-course-reserves.pl
opac-curbside-pickups.pl Bug 30650: Prevent pickup to be created on holiday 2022-07-29 15:00:51 -03:00
opac-detail.pl Bug 33569: Fix sort by relevance in catalog search 2023-05-09 11:46:47 -03:00
opac-discharge.pl
opac-dismiss-message.pl Bug 12029: Remove 'params' from filter_by_unread 2023-04-20 15:48:47 -03:00
opac-downloadcart.pl Bug 29697: Use flag embed_items 2022-07-22 15:24:11 -03:00
opac-downloadshelf.pl Bug 33069: Fix error in MARC download for OPAC lists 2023-05-09 10:57:55 -03:00
opac-export.pl Bug 29697: Use flag embed_items 2022-07-22 15:24:11 -03:00
opac-holdshistory.pl
opac-ics.pl Bug 30927: Improve formatting or iCal files for checkout due dates 2022-08-09 07:39:17 -03:00
opac-idref.pl
opac-illrequests.pl
opac-image.pl
opac-imageviewer.pl
opac-ISBDdetail.pl Bug 30678: (follow-up) Change call in opac scripts 2022-07-22 14:58:12 -03:00
opac-issue-note.pl
opac-library.pl Bug 31775: Show single library 2022-10-17 08:25:55 -03:00
opac-main.pl Bug 31051: Show patron savings on the OPAC 2023-02-22 10:03:33 -03:00
opac-MARCdetail.pl Bug 23247: Use EmbedItems in opac-MARCdetail.pl 2023-02-20 09:44:15 -03:00
opac-memberentry.pl Bug 33197: Rename GDPR_Policy system preference 2023-05-05 10:18:54 -03:00
opac-messaging.pl Bug 31743: Change condition for messaging tab 2022-11-04 20:01:13 -03:00
opac-modrequest-suspend.pl
opac-modrequest.pl Bug 14783: (QA follow-up) Rename method and move tests 2022-10-17 15:43:22 -03:00
opac-mymessages.pl
opac-news-rss.pl
opac-overdrive-search.pl
opac-page.pl Bug 32251: Add a fallback for when language cookie was removed 2023-01-27 16:20:24 -03:00
opac-passwd.pl
opac-password-recovery.pl Bug 31739: Password recovery from staff fails if previous expired reset-entry exists. 2022-10-24 14:12:16 -03:00
opac-patron-consent.pl Bug 33197: Rename GDPR_Policy system preference 2023-05-05 10:18:54 -03:00
opac-patron-image.pl
opac-privacy.pl
opac-ratings.pl
opac-readingrecord.pl Bug 31051: Show patron savings on the OPAC 2023-02-22 10:03:33 -03:00
opac-recall.pl Bug 30291: Changes to OPAC files 2022-05-05 11:17:36 -10:00
opac-recalls.pl Bug 30291: Changes to OPAC files 2022-05-05 11:17:36 -10:00
opac-recordedbooks-search.pl
opac-registration-verify.pl Bug 33192: Update all occurrences of AutoEmailPrimaryAddress 2023-04-14 11:35:39 -03:00
opac-renew.pl
opac-reportproblem.pl
opac-request-article.pl
opac-reserve.pl Bug 32674: Fix placing a hold at the OPAC for serials 2023-03-06 09:51:44 -03:00
opac-reset-password.pl Bug 29925: Add a password reset page for expired passwords 2022-05-06 10:33:09 -10:00
opac-restrictedpage.pl
opac-retrieve-file.pl
opac-review.pl
opac-routing-lists.pl
opac-search-history.pl
opac-search.pl Bug 33569: Fix sort by relevance in catalog search 2023-05-09 11:46:47 -03:00
opac-sendbasket.pl Bug 3150: (QA follow-up) Tidy scripts 2023-03-27 12:49:47 +02:00
opac-sendshelf.pl Bug 3150: (QA follow-up) Tidy scripts 2023-03-27 12:49:47 +02:00
opac-serial-issues.pl
opac-shareshelf.pl
opac-shelves.pl Bug 32434: Show "Lists" line on lists results 2023-01-30 15:09:03 -03:00
opac-showmarc.pl
opac-showreviews.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
opac-suggestions.pl Bug 29311: (QA follow-up) Fix an existing spelling typo 2023-04-06 10:03:14 -03:00
opac-tags.pl Bug 28375: (follow-up) Use C4::Context->interface 2022-10-20 11:50:53 -03:00
opac-tags_subject.pl
opac-topissues.pl
opac-user.pl Bug 31051: Show patron savings on the OPAC 2023-02-22 10:03:33 -03:00
tracklinks.pl Bug 30262: Trim whitespace off tracklinks.pl URLs 2022-08-31 08:46:11 -03:00
unapi