Bug 28946 - 500 error when choosing patron for purchase suggestion
Summary: 500 error when choosing patron for purchase suggestion
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All Linux
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 23271 23590
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-03 03:18 UTC by jstallings
Modified: 2021-10-26 14:26 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05


Attachments
Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl (1.64 KB, patch)
2021-09-10 08:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28946: (bug 23271 follow-up) Missing occurrence in add_user_search.pl (1.69 KB, patch)
2021-09-10 11:39 UTC, Nick Clemens
Details | Diff | Splinter Review

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