From a33d75c5b6090c6f42b5ef08baf435d44ae26a08 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Apr 2016 11:33:11 +0100 Subject: [PATCH] Bug 15930: Make patron searches defaulting on 'contain' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The default patron search types has changed from 'contain' to start_with. Users consider it as a bug. This patch revert the previous changes to default on 'contain'. Test plan: Search for patrons in different places (guarantor, checkout, patron module, acquisition module, etc.) and confirm that the default is always 'contain' Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Brendan Gallagher (cherry picked from commit a8491dc156db9d746b0f5ddd6175b66bf1bfa4ab) Signed-off-by: Julian Maurice (cherry picked from commit f2c5b7b036a47289a069f89bf3e63ede548058d8) Signed-off-by: Frédéric Demians --- C4/Utils/DataTables/Members.pm | 2 +- .../intranet-tmpl/prog/en/includes/patron-search.inc | 8 ++++---- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 7 ++++--- members/member.pl | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm index 1f7facb470..e7ba5f39a6 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -12,7 +12,7 @@ sub search { my $firstletter = $params->{firstletter}; my $categorycode = $params->{categorycode}; my $branchcode = $params->{branchcode}; - my $searchtype = $params->{searchtype} || 'start_with'; + my $searchtype = $params->{searchtype} || 'contain'; my $searchfieldstype = $params->{searchfieldstype} || 'standard'; my $dt_params = $params->{dt_params}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 8b0ffca276..cb761204a4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -68,12 +68,12 @@

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index a0a47cc56d..88a00a44eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -463,10 +463,11 @@ function filterByFirstLetterSurname(letter) {
  • diff --git a/members/member.pl b/members/member.pl index 1cc5ac5606..0d1868761e 100755 --- a/members/member.pl +++ b/members/member.pl @@ -79,7 +79,7 @@ $template->param( searchmember => $searchmember, branchcode_filter => $input->param('branchcode_filter'), categorycode_filter => $input->param('categorycode_filter'), - searchtype => $input->param('searchtype') || 'start_with', + searchtype => $input->param('searchtype') || 'contain', searchfieldstype => $searchfieldstype, PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, view => $view, -- 2.39.5