Bug 28946

Summary: 500 error when choosing patron for purchase suggestion
Product: Koha Reporter: jstallings
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Nick Clemens <nick>
Severity: major    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, kyle, nick
Version: master   
Hardware: All   
OS: Linux   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05
Bug Depends on: 23271, 23590    
Bug Blocks:    
Attachments: Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl
Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl

Description jstallings 2021-09-03 03:18:44 UTC
Running 21.05.02 on Debian stretch 9.13. When selecting "set to patron" or "select manager" when entering a purchase suggestion from the staff console, a 500 error rather than a search box appears in the popup.

This issue seems related to bug 26738, where suggestion managers and patrons were unable to be saved, but I'm unable to get even that far.
Comment 1 Jonathan Druart 2021-09-09 07:31:32 UTC
What error you have in the Koha log files?
Comment 2 Owen Leonard 2021-09-09 10:34:42 UTC
I get this error in master: The method Koha::Patron::Categories->search_limited is not covered by tests!
Comment 3 jstallings 2021-09-09 12:45:55 UTC
As above, "The method Koha::Patron::Categories->search_limited is not covered by tests!" Full plack-error.log: https://pastebin.com/1hZnCGnD

Nothing in intranet or other logs.
Comment 4 Jonathan Druart 2021-09-10 08:07:45 UTC
Created attachment 124725 [details] [review]
Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl

commit f6e0b04f48e8f0a02dbb8d48152646257d9accba
Bug 23271: Replace search_limited with search_with_library_limits

We were modifying the occurrences of:
  Koha::Patron::Categories->search_limited;
with:
  Koha::Patron::Categories->search_with_library_limits;

But between the patch submission and the push, another occurrence has
been added by bug 23590.

Test plan:
Create a new suggestion from staff and click "select manager"
Without the patch, notice the error:
  The method Koha::Patron::Categories->search_limited is not covered by tests!
With the patch applied everything is working correctly
Comment 5 Nick Clemens 2021-09-10 11:39:40 UTC
Created attachment 124751 [details] [review]
Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl

commit f6e0b04f48e8f0a02dbb8d48152646257d9accba
Bug 23271: Replace search_limited with search_with_library_limits

We were modifying the occurrences of:
  Koha::Patron::Categories->search_limited;
with:
  Koha::Patron::Categories->search_with_library_limits;

But between the patch submission and the push, another occurrence has
been added by bug 23590.

Test plan:
Create a new suggestion from staff and click "select manager"
Without the patch, notice the error:
  The method Koha::Patron::Categories->search_limited is not covered by tests!
With the patch applied everything is working correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2021-09-14 16:26:01 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall 2021-10-01 17:28:42 UTC
Pushed to 21.05.x for 21.05.05
Comment 8 Fridolin Somers 2021-10-06 20:01:05 UTC
Depends on Bug 23271 not in 20.11.x