Summary: | Creating default waiting hold cancellation policy for all patron categories and itemtypes breaks Koha | ||
---|---|---|---|
Product: | Koha | Reporter: | Emmi Takkinen <emmi.takkinen> |
Component: | Fines and fees | Assignee: | Emmi Takkinen <emmi.takkinen> |
Status: | Needs documenting --- | QA Contact: | Pedro Amorim <pedro.amorim> |
Severity: | critical | ||
Priority: | P5 - low | CC: | aleisha, chris, dcook, emily.lamancusa, fridolin.somers, isabel.pineda, lucas, pedro.amorim, tomascohen, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37263 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37531 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.03
|
|
Circulation function: | |||
Bug Depends on: | 36672 | ||
Bug Blocks: | 37764 | ||
Attachments: |
Bug 37255: Fix handling of "All" values on waiting hold cancellation policy
Bug 37255: Fix handling of "All" values on waiting hold cancellation policy Bug 37255: Fix handling of "All" values on waiting hold cancellation policy |
Description
Emmi Takkinen
2024-07-04 10:45:11 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 Created attachment 168524 [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 Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 168552 [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 Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Pushed for 24.11! Well done everyone, thank you! Increasing the severity on this one and flagging it for backport, since it crashes the page. *** Bug 37531 has been marked as a duplicate of this bug. *** Pushed to main for 24.11. Nice work everyone, thanks! Pushed to 23.05.x. Nice work everyone, thanks! Pushed to 23.05.x. Nice work everyone, thanks! Pushed to 23.05.x. Nice work everyone, thanks! (In reply to Tomás Cohen Arazi from comment #11) > Pushed to 23.05.x. > > Nice work everyone, thanks! Git bz error? Or did this actually get pushed for 23.05.x? (In reply to Emily Lamancusa from comment #12) > (In reply to Tomás Cohen Arazi from comment #11) > > Pushed to 23.05.x. > > > > Nice work everyone, thanks! > > Git bz error? Or did this actually get pushed for 23.05.x? It will be part of the upcoming maintenance releases as an urgent backport. Stay tuned :) (In reply to Katrin Fischer from comment #13) > (In reply to Emily Lamancusa from comment #12) > > (In reply to Tomás Cohen Arazi from comment #11) > > > Pushed to 23.05.x. > > > > > > Nice work everyone, thanks! > > > > Git bz error? Or did this actually get pushed for 23.05.x? > > It will be part of the upcoming maintenance releases as an urgent backport. > Stay tuned :) Ah, I see. It shouldn't be backported that far, though - the bug was caused by bug 36672, which is only in main and 24.05 Thanks for noticing Emily. I guess we can't leave it in? ... Unfortunately, no. :( The cause of this regression was that a variable value was switched from '*' to undef, and a few cases got missed. So applying this patch to 23.05 causes the same 500 error that it's meant to solve in 24.05 and main. It was more of a rhetoric question, I'll try to get that sorted ASAP. Reverted the patch from 23.11, 23.05 and 22.11 branches. Thanks again Emily! (In reply to Katrin Fischer from comment #18) > Reverted the patch from 23.11, 23.05 and 22.11 branches. > Thanks again Emily! I don't think this was reverted from 23.11.x, as it's still in 23.11.08. (In reply to David Cook from comment #19) > (In reply to Katrin Fischer from comment #18) > > Reverted the patch from 23.11, 23.05 and 22.11 branches. > > Thanks again Emily! > > I don't think this was reverted from 23.11.x, as it's still in 23.11.08. You need to look at the latest tag: 23.11.08-1. That's what we used for the tarballs and packages. It has the revert on top: https://git.koha-community.org/Koha-community/Koha/commits/tag/v23.11.08-1 Depends on Bug 36672 not in 23.11.x Not backporting to 23.05.x unless requested |