From 4f3f921025b86d6139ac456260c45a6d1d64cd14 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 22 Jun 2023 15:37:55 +0100 Subject: [PATCH] Bug 34094: Use DefaultPatronSearchMethod consistently Content-Type: text/plain; charset=utf-8 This patch updates the patron search bar and pages to default search method to that defined by DefaultPatronSearchMethod system preference. Test plan 1) Prior to this patch confirm that regardless of what you set DefaultPatronSearchMethod to, the search in /members/member.pl, members/members-home.pl and the search from the patrons search top bar all default to 'contains'. 2) Apply the patch 3) Confirm that the system preference now affects the default option for match type upon page load. Signed-off-by: Sam Lau Signed-off-by: Marcel de Rooy --- circ/circulation.pl | 2 -- .../prog/en/includes/member-search-box.inc | 11 +++++---- .../prog/en/includes/patron-search.inc | 23 ++++++++++--------- .../prog/en/modules/members/member.tt | 3 ++- members/member.pl | 1 - 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 7b35a8c860..9b925e29ad 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -150,8 +150,6 @@ my @failedreturns = $query->multi_param('failedreturn'); our %return_failed = (); for (@failedreturns) { $return_failed{$_} = 1; } -my $searchtype = $query->param('searchtype') || q{contain}; - my $branch = C4::Context->userenv->{'branch'}; for my $barcode ( @$barcodes ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc index 09d3a4e3a0..42543b2a1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc @@ -4,6 +4,7 @@ [% USE Koha %] [% PROCESS 'patronfields.inc' %] [% IF CAN_user_borrowers_edit_borrowers %] + [%- SET searchtype = Koha.Preference('DefaultPatronSearchMethod') -%] [% IF( bs_tab_active ) %]