Koha/C4
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
..
AuthoritiesMarc
Barcodes Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
ClassSortRoutine
ClassSplitRoutine
Creators Bug 32222: Fix capitalization in various "id is invalid" 2023-02-07 10:29:35 -03:00
External
Form
Heading Bug 33100: Remove all punctuation at end of record 2023-03-17 09:59:07 -03:00
ILSDI Bug 31177: Fix misplaced import in C4::ILSDI::Services 2022-08-31 14:28:28 -03:00
Installer
Labels Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
Linker Bug 30280: Add support for subject headings from different thesaurus when using Elasticsearch 2022-10-03 10:00:04 -03:00
Members
OAI Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) 2022-07-29 15:43:39 -03:00
Output
Patroncards Bug 31259: Escape infinite loop when lime cannot wrap enough 2023-03-31 13:13:39 +02:00
Reports Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
Search Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
Serials
SIP Bug 33216: Catch and handle RegisterRequired exceptions for SIP fee paid messages 2023-04-19 09:20:48 -03:00
Utils
Accounts.pm Bug 29184: Fix warn about undefined replacecost 2022-09-08 10:50:30 -07:00
Acquisition.pm Bug 25655: Store invoice price and currency even if no currency change 2023-03-06 13:57:53 -03:00
Auth.pm Bug 33197: Rename GDPR_Policy system preference 2023-05-05 10:18:54 -03:00
Auth_cas_servers.yaml.sample
Auth_with_cas.pm Bug 27342: Remove dbh from C4::Auth 2022-08-16 10:45:41 -03:00
Auth_with_ldap.pm Bug 30646: (follow-up) Set to send immediately 2022-10-03 14:02:40 -03:00
Auth_with_shibboleth.pm Bug 30646: (follow-up) Set to send immediately 2022-10-03 14:02:40 -03:00
AuthoritiesMarc.pm Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc 2023-03-31 18:43:40 +02:00
BackgroundJob.pm
Barcodes.pm
Biblio.pm Bug 33262: Store the biblionumber of a deleted record in the order line 2023-05-05 10:18:33 -03:00
Breeding.pm Bug 33231: (QA follow-up) Simplify conditional for date display 2023-04-14 11:35:36 -03:00
Budgets.pm Bug 27550: "Duplicate budget" does not keep users associated with that budget 2022-09-22 08:18:33 -03:00
Calendar.pm
Charset.pm
Circulation.pm Bug 32013: Autorenewal batch indexing 2023-04-12 09:26:56 -03:00
ClassSortRoutine.pm
ClassSource.pm
ClassSplitRoutine.pm
Context.pm Bug 33569: Fix sort by relevance in catalog search 2023-05-09 11:46:47 -03:00
Contract.pm
CourseReserves.pm Bug 30016: Remove GetOpenIssue subroutine 2022-08-31 08:50:37 -03:00
Creators.pm
Heading.pm Bug 33159: Simplify ES handling and fix zebra handling 2023-03-31 11:56:53 +02:00
HoldsQueue.pm Bug 32247: Exit holds queue builder if there are no holds on the biblio 2022-12-15 09:49:53 -03:00
HTML5Media.pm
ImportBatch.pm Bug 33576: (QA follow-up) Polish comment, typo 2023-05-09 10:58:06 -03:00
ImportExportFramework.pm
InstallAuth.pm
Installer.pm Bug 28267: Simplify things 2023-05-05 10:18:36 -03:00
ItemCirculationAlertPreference.pm
Items.pm Bug 32456: Preserve date accessioned if a date is not explicitly passed 2022-12-27 10:47:05 -03:00
Koha.pm Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
Labels.pm
Languages.pm Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
Letters.pm Bug 33360: (follow-up) Adjust wording in verbose mode 2023-04-14 11:35:34 -03:00
Linker.pm
Log.pm Bug 32057: (QA follow-up) Remove pretty flag 2023-03-14 08:49:34 -03:00
MarcModificationTemplates.pm
Matcher.pm Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6 2023-03-16 16:23:01 -03:00
Members.pm Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
Message.pm Bug 18398: (follow-up) Update POD & Unit tests 2023-03-31 13:13:35 +02:00
Output.pm Bug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorities-home.pl ) 2022-07-25 11:18:11 -03:00
Overdues.pm Bug 27259: Add HomeOrHoldingBranch checks where it was missing from 2022-11-04 19:04:18 -03:00
Patroncards.pm
Record.pm Bug 29697: Fix t/db_dependent/Exporter/Record.t 2022-07-25 09:30:35 -03:00
Reports.pm
Reserves.pm Bug 33210: (Bug 31963 follow-up) No hold fee message on OPAC should be displayed when there is no fee 2023-04-21 10:36:27 -03:00
Ris.pm Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
RotatingCollections.pm
Scheduler.pm
Scrubber.pm
Search.pm Bug 13976: Sort popularity numerically in Zebra 2023-03-31 12:40:00 +02:00
Serials.pm Bug 33040: Add "Date published (text)" to serials tab on record view (detail.pl) 2023-04-06 09:47:26 -03:00
Service.pm
ShelfBrowser.pm Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
SMS.pm
SocialData.pm
Stats.pm Bug 7021: Terminology - usercode -> categorycode 2022-09-22 09:31:28 -03:00
Suggestions.pm Bug 32027: Fix 'librarian interface' to use 'staff interface' in Pages/HTML customizations/News 2023-02-07 10:31:29 -03:00
Tags.pm Bug 31517: (QA follow-up) Fix indentation 2022-11-04 19:30:56 -03:00
Templates.pm Bug 31390: Remove noisy warns in C4::Templates 2022-08-22 13:25:00 -03:00
TmplToken.pm
TmplTokenType.pm
TTParser.pm
UsageStats.pm Bug 33192: Update all occurrences of AutoEmailPrimaryAddress 2023-04-14 11:35:39 -03:00
XISBN.pm
XSLT.pm Bug 31123: Display content warnings on the intranet 2023-04-06 10:44:58 -03:00