Bug 37255 - Creating default waiting hold cancellation policy for all patron categories and itemtypes breaks Koha
Summary: Creating default waiting hold cancellation policy for all patron categories a...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Emmi Takkinen
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-04 10:45 UTC by Emmi Takkinen
Modified: 2024-07-04 11:51 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 37255: Fix handling of "All" values on waiting hold cancellation policy (2.36 KB, patch)
2024-07-04 11:51 UTC, Emmi Takkinen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2024-07-04 10:45:11 UTC
If one creates a default waiting hold cancellation policy with patron categories set as "All" and itemtype set as "All", Koha breaks on 500 error. Logs read:

Template process failed: undef error - Can't call method "description" on an undefined value at ../Koha/Koha/Template/Plugin/Categories.pm line 39.
Comment 1 Emmi Takkinen 2024-07-04 11:51:01 UTC
Created attachment 168494 [details] [review]
Bug 37255: Fix handling of "All" values on waiting hold cancellation policy

If one creates a default waiting hold cancellation policy with
patron categories set as "All" and itemtype set as "All", Koha
breaks on 500 error. This happens because in we try to match
template policy with "All" values either in category or itemtype
with *, not undef. This patch fixes this.

To test:
1. Create a new default waiting hold cancellation policy and
set both patron category and itemtype as "All".
2. Save policy.
=> Error page for error 500 is displayed.
3. Apply this patch.
4. Reload page.
=> Page is displayed and policy listing displays new policy
as it should.

Sponsored-by: Koha-Suomi Oy