]> git.koha-community.org Git - koha.git/commit
Bug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl
authorKyle M Hall <kyle@bywatersolutions.com>
Sat, 24 Sep 2016 19:25:33 +0000 (19:25 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 24 Oct 2016 09:35:49 +0000 (11:35 +0200)
commit50f270140adbb3792e8a9ff92b5c9cfd8ac527d2
tree4dc68b6f08aa16f2d9744a9119baf2c3f4348393
parentff4d8128f77c3a9ec4b8537bda92fb9e53b98be7
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 56da7be50ada38bab6ec866f5915d55507c7d821)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 26efec07d7344ecf3c29981e735246dec6416bd1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
circ/circulation.pl