Bug 16197 - Searching for user in reserve/request.pl is broken
Summary: Searching for user in reserve/request.pl is broken
Status: RESOLVED DUPLICATE of bug 15930
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Blou
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 19:25 UTC by Blou
Modified: 2016-04-06 10:37 UTC (History)
6 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:


Attachments
Bug 16197 - Specifying both last and firstname in reserve's patrong search yields nothing. (1.26 KB, patch)
2016-04-04 20:54 UTC, Blou
Details | Diff | Splinter Review
Bug 16197 - Specifying both last and firstname in reserve's patrong search yields nothing. (1.32 KB, patch)
2016-04-04 23:47 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 ***