Bugzilla – Attachment 50537 Details for
Bug 16316
Make it possible to limit patron search to surname
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16316 - Limit patron search to surname
SIGNED-OFF-Bug-16316---Limit-patron-search-to-surn.patch (text/plain), 3.40 KB, created by
Owen Leonard
on 2016-04-21 18:09:46 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16316 - Limit patron search to surname
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-04-21 18:09:46 UTC
Size:
3.40 KB
patch
obsolete
>From 59558d3e5d0ddda2a34c89a010aa45c4e0d83154 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Thu, 21 Apr 2016 14:58:11 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 16316 - Limit patron search to surname >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset="utf-8" > >This patch makes it possible to limit a patron search to >search just for surnames. > >To test: >- Apply the patch >- Add two patrons, called e.g. "John Doe" and "Doe John" >- Go to Patrons in the Intranet >- Make sure you have selected "Search fields" = Standard >- Search for "john" and verify both patrons show up >- Search for "doe" and verify both patrons show up >- Set "Search fields" = Surname and search for "john". > "Doe John" should show up, but not "John Doe". >- Set "Search fields" = Surname and search for "doe". > "John Doe" should show up, but not "Doe John". > >Update: Revised the last point in the test plan. > >Sponsored-by: Alingsås Public Library, Sweden >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Utils/DataTables/Members.pm | 1 + > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 5 +++++ > koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 5 +++++ > 3 files changed, 11 insertions(+) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index 1ebecd7..090eb97 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -61,6 +61,7 @@ sub search { > > my $searchfields = { > standard => 'surname,firstname,othernames,cardnumber,userid', >+ surname => 'surname', > email => 'email,emailpro,B_email', > borrowernumber => 'borrowernumber', > userid => 'userid', >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..1b3abe7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -22,6 +22,11 @@ > [% ELSE %] > <option value='standard'>Standard</option> > [% END %] >+ [% IF searchfieldstype == "surname" %] >+ <option selected="selected" value='surname'>Surname</option> >+ [% ELSE %] >+ <option value='surname'>Surname</option> >+ [% END %] > [% IF searchfieldstype == "email" %] > <option selected="selected" value='email'>Email</option> > [% ELSE %] >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..560d9f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -423,6 +423,11 @@ function filterByFirstLetterSurname(letter) { > [% ELSE %] > <option value='standard'>Standard</option> > [% END %] >+ [% IF searchfieldstype == "surname" %] >+ <option selected="selected" value='surname'>Surname</option> >+ [% ELSE %] >+ <option value='surname'>Surname</option> >+ [% END %] > [% IF searchfieldstype == "email" %] > <option selected="selected" value='email'>Email</option> > [% ELSE %] >-- >2.1.4
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 16316
:
50504
|
50536
|
50537
|
50712
|
50746
|
50747