Bug 14562 - [3.18.x] Patron with empty card number will be only result returned by patron datatables search
Summary: [3.18.x] Patron with empty card number will be only result returned by patron...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: 3.18
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-18 01:12 UTC by Jesse Weaver
Modified: 2016-06-21 21:38 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14562: All patrons returned if 1 has a cardnumber set to an empty string (Fix conflict with bug 12833) (1.17 KB, patch)
2015-08-10 08:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14562: All patrons returned if 1 has a cardnumber set to an empty string (Fix conflict with bug 12833) (1.31 KB, patch)
2015-10-09 09:35 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
[PASSED QA] Bug 14562: All patrons returned if 1 has a cardnumber set to an empty string (Fix conflict with bug 12833) (1.38 KB, patch)
2015-10-18 11:03 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Weaver 2015-07-18 01:12:39 UTC
Due to the fact that the if statement wrapping the single-patron search does not check that a cardnumber was passed, svc/members/search will attempt to search for a patron with an empty cardnumber. This should normally fail, but if such a patron exists (a possibility after importing/migrating) it will always succeed and prevent normal searching.
Comment 1 Jonathan Druart 2015-08-04 09:19:03 UTC
What kind of searches did you try?
I have a patron with cardnumber="", search by letter (browse by name), and different filter combinations work here.
Comment 2 Jesse Weaver 2015-08-06 23:15:14 UTC
Ah, on closer inspection, this is fixed by commit 481479fe627dcbabb3ef66df0724cc3fe75b110c: "Bug 12648: Fix conflict with bug 12833", which just needs to be backported to 3.18.
Comment 3 Jonathan Druart 2015-08-10 08:59:59 UTC Comment hidden (obsolete)
Comment 4 Mirko Tietgen 2015-08-12 12:12:41 UTC
Can't reproduce on 3.18.9.

I do a search for 't', then filter the results by search type or category. One of the patrons has an empty card number. Works for me.

Anything else I should try?
Comment 5 Jesse Weaver 2015-08-12 21:51:59 UTC
This error only occurs when you don't click on a first letter.
Comment 6 Joonas Kylmälä 2015-10-09 09:35:06 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2015-10-18 11:03:32 UTC
Created attachment 43568 [details] [review]
[PASSED QA] Bug 14562: All patrons returned if 1 has a cardnumber set to an empty string (Fix conflict with bug 12833)

This patch is a backport of (Bug 12648 is in 3.20.x, not 3.18.x):
commit 481479fe627dcbabb3ef66df0724cc3fe75b110c
    Bug 12648: Fix conflict with bug 12833

Test plan:
Set the cardnumber of one of the patron to an empty string
Do a patron search and use filters
The search will redirect to the patron detail page of the patron with
the empty string

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Liz Rea 2015-10-19 20:48:25 UTC
Pushed to 3.18.x will be in 3.18.12.