From 1c7812b3990fd3725367d1e3d8e7668ba1acc18e 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' 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' --- C4/Utils/DataTables/Members.pm | 2 +- koha-tmpl/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 1ebecd7..cc3cba0 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -13,7 +13,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 4765e03..1dce31c 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 cfe6f21..43883f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -468,10 +468,11 @@ function filterByFirstLetterSurname(letter) {
  • diff --git a/members/member.pl b/members/member.pl index 1cc5ac5..0d18687 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.7.0