Bug 18987

Summary: When browsing for a patron by last name the page processes indefinitely
Product: Koha Reporter: Alex Buckley <alexbuckley>
Component: PatronsAssignee: Alex Buckley <alexbuckley>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: critical    
Priority: P1 - high CC: dcook, fridolin.somers, gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall, m.de.rooy
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17585    
Bug Blocks:    
Attachments: Bug 18987 - Added Koha::Account package pragma to Patron.pm
Bug 18987 - Added Koha::Account package pragma to Patron.pm
Bug 18987 - Added Koha::Account package pragma to Patron.pm

Description Alex Buckley 2017-07-26 22:01:15 UTC
When browsing for a patron by last name the patron result page processes indefinitely instead of displaying results. This is after browser cache has been cleared.
Comment 1 Alex Buckley 2017-07-26 22:15:24 UTC
Created attachment 65287 [details] [review]
Bug 18987 - Added Koha::Account package pragma to Patron.pm

Test plan:
1. On an up to date branch go to Patrons and try to browse for a patron
by last name
2. Notice that the page processes indefinately
3. Apply patch
4. Repeat step 1
5. Notice the patron results are displayed
Comment 2 David Cook 2017-07-27 01:25:58 UTC
I've noticed other scenarios where the patron result page processes indefinitely as well (typically when an invalid JSON response is returned), but I'll save that for another day.

I'll check this out now.
Comment 3 David Cook 2017-07-27 01:41:32 UTC
The patron browse is super slow... but I imagine that pre-dates the patch, so I'll sign it off in a moment.
Comment 4 David Cook 2017-07-27 01:42:12 UTC
Created attachment 65290 [details] [review]
Bug 18987 - Added Koha::Account package pragma to Patron.pm

Test plan:
1. On an up to date branch go to Patrons and try to browse for a patron
by last name
2. Notice that the page processes indefinately
3. Apply patch
4. Repeat step 1
5. Notice the patron results are displayed

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.
Comment 5 Alex Buckley 2017-07-27 01:43:02 UTC
Thanks David
Comment 6 Jonathan Druart 2017-07-27 16:27:27 UTC
The changes make sense but I do not recreate the error.
Comment 7 Jonathan Druart 2017-07-27 16:28:17 UTC
I guess it has been caused by bug 17585.
Comment 8 Marcel de Rooy 2017-07-27 18:02:24 UTC
Check your logs. Seeing problems with rounding large numbers etc? Than maybe running a few tests created very large numbers in patron related tables. And they could be the cause of no results.
Comment 9 David Cook 2017-07-28 00:40:31 UTC
Fwiw, I created a database from scratch and inserted all the sample data, and that's how I reproduced it.
Comment 10 Marcel de Rooy 2017-07-28 10:10:01 UTC
Created attachment 65307 [details] [review]
Bug 18987 - Added Koha::Account package pragma to Patron.pm

Test plan:
1. On an up to date branch go to Patrons and try to browse for a patron
by last name
2. Notice that the page processes indefinately
3. Apply patch
4. Repeat step 1
5. Notice the patron results are displayed

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Jonathan Druart 2017-07-28 14:27:15 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 12 Jonathan Druart 2017-07-28 14:28:29 UTC
Did not recreate but pushed anyway. Cannot hurt.
Comment 13 Fridolin SOMERS 2017-07-31 08:45:07 UTC
Pushed to 17.05.x, will be in 17.05.03.
Comment 14 Katrin Fischer 2017-08-01 05:53:47 UTC
Dependency and bug are not in 16.11.x.