Bugzilla – Attachment 55832 Details for
Bug 17352
Patron search type is hard coded to 'contain' in circ/circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl
Bug-17352---Patron-search-type-is-hard-coded-to-co.patch (text/plain), 1.99 KB, created by
Josef Moravec
on 2016-09-27 05:46:36 UTC
(
hide
)
Description:
Bug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-09-27 05:46:36 UTC
Size:
1.99 KB
patch
obsolete
>From 265908a7465e2552a4496f9daa89bc5aa32ef7bc Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Sat, 24 Sep 2016 19:25:33 +0000 >Subject: [PATCH] Bug 17352 - Patron search type is hard coded to 'contain' in > circ/circulation.pl > >The patron search type is hard coded to 'contain' in >circ/circulation.pl. > >This causes problems because a mis-scanned cardnumber can bring up the >wrong patron. > >The example that our partner gave us involved scanning '1733', which >doesn't match any borrowers when we do a 'start_with' search, but >matches the cardnumber 'p291733'. > >If we follow the usage in members/member.pl, we can set searchtype in >HTTP params, which is amenable to fixes in intranetuserjs > >Test Plan: >1) Apply this patch >2) Use the checkout search, not changes should be noted > >Extra credit: >1) Add javascript to intranetuserjs to add a hidden input named >'searchtype' with the value 'start_with' >2) Checkout searches should now give only results where a searched > field starts with the given string(s) > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > circ/circulation.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index b5442e4..fcd967d 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -139,6 +139,8 @@ my @failedreturns = $query->multi_param('failedreturn'); > our %return_failed = (); > for (@failedreturns) { $return_failed{$_} = 1; } > >+my $searchtype = $query->param('searchtype') || q{contain}; >+ > my $findborrower = $query->param('findborrower') || q{}; > $findborrower =~ s|,| |g; > >@@ -239,8 +241,8 @@ if ($findborrower) { > my $results = C4::Utils::DataTables::Members::search( > { > searchmember => $findborrower, >- searchtype => 'contain', >- dt_params => $dt_params, >+ searchtype => $searchtype, >+ dt_params => $dt_params, > } > ); > my $borrowers = $results->{patrons}; >-- >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 17352
:
55823
|
55832
|
55843