Bugzilla – Attachment 49948 Details for
Bug 15930
DataTables patron search defaulting to 'starts_with' and not getting correct parameters to parse multiple word searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15930: Make patron searches defaulting on 'contain'
Bug-15930-Make-patron-searches-defaulting-on-conta.patch (text/plain), 4.28 KB, created by
Jonathan Druart
on 2016-04-06 10:36:47 UTC
(
hide
)
Description:
Bug 15930: Make patron searches defaulting on 'contain'
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-04-06 10:36:47 UTC
Size:
4.28 KB
patch
obsolete
>From 1c7812b3990fd3725367d1e3d8e7668ba1acc18e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 @@ > <p> > <label for="searchtype">Search type:</label> > <select name="searchtype" id="searchtype"> >- [% IF searchtype != 'start_with' %] >- <option value='start_with'>Starts with</option> >- <option selected="selected" value='contain'>Contains</option> >- [% ELSE %] >+ [% IF searchtype == 'start_with' %] > <option selected="selected" value='start_with'>Starts with</option> > <option value='contain'>Contains</option> >+ [% ELSE %] >+ <option value='start_with'>Starts with</option> >+ <option selected="selected" value='contain'>Contains</option> > [% END %] > </select> > </p> >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) { > <li> > <label for="searchtype_filter">Search type:</label> > <select name="searchtype" id="searchtype_filter"> >- <option value='start_with'>Starts with</option> >- [% IF searchtype == "contain" %] >- <option value="contain" selected="selected">Contains</option> >+ [% IF searchtype == "start_with" %] >+ <option value='start_with' selected="selected">Starts with</option> >+ <option value="contain">Contains</option> > [% ELSE %] >+ <option value='start_with'>Starts with</option> > <option value="contain" selected="selected">Contains</option> > [% END %] > </select> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15930
:
49948
|
50006
|
50483