Bug 16197

Summary: Searching for user in reserve/request.pl is broken
Product: Koha Reporter: Blou <philippe.blouin>
Component: Hold requestsAssignee: Blou <philippe.blouin>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: eric.begin, francois.charbonnier, gmcharlt, jonathan.druart, marjorie.barry-vila, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13894
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15930
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252
GIT URL: 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 16197 - Specifying both last and firstname in reserve's patrong search yields nothing.
Bug 16197 - Specifying both last and firstname in reserve's patrong search yields nothing.

Description Blou 2016-04-04 19:25:38 UTC
The user search in reserve/request.pl got broken by bug 13894.  The search using the "recordset" doesn not care for "lastname, firstname" as before, instead finding nothing.

Scenario:

EASY SETUP: database with two borrowers with same last name, and one record minimu.
1) go to KOHA_SITE/cgi-bin/koha/reserve/request.pl?biblionumber=1
2) enter the last name.  You should get two results in the table
3) same site, enter "lastname, firstname" (comma optional).  You get no result.

This used to work before 13894.  Vile RecordSet broke it...
Comment 1 Blou 2016-04-04 19:39:32 UTC
Actually, problem seems with C4/Utils/DataTables/Members.pm 's search method.
Comment 2 Blou 2016-04-04 20:54:28 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens (kidclamp) 2016-04-04 23:47:25 UTC
Created attachment 49887 [details] [review]
Bug 16197 - Specifying both last and firstname in reserve's patrong search yields nothing.

The user search in reserve/request.pl got broken by bug 13894.
The search using the "recordset" doesn not care for "lastname, firstname" as before, instead finding nothing.

Test scenario:

EASY SETUP: database with two borrowers with same last name, and one record minimu.
1) go to KOHA_SITE/cgi-bin/koha/reserve/request.pl?biblionumber=1
2) enter the last name.  You should get two results in the table
3) same site, enter "lastname, firstname" (comma optional).  You get no result.
4) Apply the patch, same test now return the one matching result.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens (kidclamp) 2016-04-04 23:52:15 UTC
I signed off, but am marking to in discussion as I think this is the same issue as 15930. 

I like this approach, but it causes issues for the patch of 15252.

I think the best solution proposed is to use "quotes" to force phrase searching for two part names
Comment 5 Jonathan Druart 2016-04-05 05:53:58 UTC
Blou, please jump into the discussion on bug 15930. I'd like to provide a global fix for this issue.
Comment 6 Jonathan Druart 2016-04-06 10:37:36 UTC

*** This bug has been marked as a duplicate of bug 15930 ***