Bug 19418

Summary: Patron search is broken
Product: Koha Reporter: Alex Arnaud <alex.arnaud>
Component: PatronsAssignee: Alex Arnaud <alex.arnaud>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P1 - high CC: fridolin.somers, glasklas, gmcharlt, jonathan.druart, julian.maurice, katrin.fischer, kyle.m.hall, mtj, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12833    
Bug Blocks:    
Attachments: Bug 19418 - Fix patron search
Screenshot with frozen patron search "Processing"
Bug 19418: (bug 12833 follow-up) Add missing use statement

Description Alex Arnaud 2017-10-05 15:26:53 UTC
Test plan:

syspref ExtendedPatronAttributes => enabled
Search fields: standard 
Search what you want
The call to svc/members/search raise an internal server error.
Comment 1 Alex Arnaud 2017-10-06 07:26:17 UTC
Created attachment 67674 [details] [review]
Bug 19418 - Fix patron search

Patron search fail on calling svc/members/search. This script
return a 500 error and the search stay on "Processing..."

Test plan:
  - Enable ExtendedPatronAttributes system preference,
  - make a standard search (search fields),
  - check the search works and it doesn't stick on "Processing..."
Comment 2 Jonathan Druart 2017-10-06 13:03:54 UTC
*** Bug 19172 has been marked as a duplicate of this bug. ***
Comment 3 Katrin Fischer 2017-10-07 12:36:06 UTC
I am sorry Alex, but I don't see the problem on master. I've tried various searches.
Comment 4 Katrin Fischer 2017-10-07 12:38:09 UTC
I've made sure that I have patron attributes configured, that it is marked searchable and that at least one of the patrons has it set.
Comment 5 Julian Maurice 2017-10-09 07:12:23 UTC
I can reproduce the problem on a fresh master (725a3022c9)
Note that I'm *not* using Plack (maybe this makes a difference ?)
Comment 6 Alex Arnaud 2017-10-09 14:27:09 UTC
Seems that some people can reproduce the bug. The patch is quite tiny and make sense (just add use C4::Members::Attributes qw(SearchIdMatchingAttribute))

This could be quickly QAed/Pushed?
Comment 7 Marc VĂ©ron 2017-10-10 06:27:06 UTC
Created attachment 67864 [details]
Screenshot with frozen patron search "Processing"

Tested on current master with Plack. The problem seems to happen arbitrarily.
See screenshot attached.
Comment 8 Jonathan Druart 2017-10-10 13:19:33 UTC
Created attachment 67871 [details] [review]
Bug 19418: (bug 12833 follow-up) Add missing use statement

Patron search fail on calling svc/members/search. This script
return a 500 error and the search stay on "Processing..."

Test plan:
  - Enable ExtendedPatronAttributes system preference,
  - make a standard search (search fields),
  - check the search works and it doesn't stick on "Processing..."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I do not recreate the issue, but the change make sense and the issue has
been raised by several people
Comment 9 Jonathan Druart 2017-10-10 13:20:57 UTC
Skipping QA step and pushing to master for 17.11.
Comment 10 Fridolin Somers 2017-10-17 07:38:04 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 11 Katrin Fischer 2017-10-18 21:06:42 UTC
This patch has been pushed to 16.11.x and will be in 16.11.13.
Comment 12 Mason James 2017-11-23 23:16:19 UTC
Pushed to 16.05.x, for 16.05.18 release