[Bug 31303] New: Fatal error when viewing OPAC user account with waiting holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Bug ID: 31303 Summary: Fatal error when viewing OPAC user account with waiting holds Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Bug 22456 added a "waiting_hold_cancellation" rule but it doesn't look it's being installed correctly, which is causing fatal errors when you view an OPAC user account with waiting holds... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- I don't know how the MySQL database is being set up in koha-testing-docker, but if "installer/data/mysql/db_revs/220600023.pl" is involved, it's clearly not working. While I can see the "hold_cancellation_requests" table in the database, the "waiting_hold_cancellation" circulation_rules entry is not getting created. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- I reckon koha-testing-docker is created from kohastructure.sql and then uses the koha-testing-docker scripts to populate from there. So really... this just means that any new Koha instance won't work because it's missing this circulation rule. Koha shouldn't need this circulation rule to be set, to the problem is with Koha::Hold::cancellation_requestable_from_opac which uses method chaining when it shouldn't. I'd say the fix here is probably to just remove the method chaining from Koha::Hold::cancellation_requestable_from_opac. Should be easy peasy lemon squeezy. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Created attachment 138771 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138771&action=edit Bug 31303: Prevent fatal errors when missing "waiting hold cancellation" rule This patch removes method chaining which didn't account for the fact that the "waiting hold cancellation" circulation rule might not exist. Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=29 2. Search for "koha" user 3. Choose the specific item and click "Place hold" 4. Check in "39999000001310" and click "Confirm hold (Y)" 5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-holds 6. Rejoice in Koha not exploding 7. Go to http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 8. Go to "Default waiting hold cancellation policy" and change "Cancellation allowed" to "Yes" and click "Add" 9. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-holds 10. Note the "Cancel" button appears 11. Rejoice again that the "Cancel" button appeared -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15516 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15516 [Bug 15516] Allow to place a hold on first available item from a group of titles -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22456 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please use the depends on, that way the author of the patch that might have caused the issue will also be informed and we can avoid backporting with open bugs (not in this case, but in general :)) Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22456 [Bug 22456] Allow patrons to cancel their waiting holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #4)
Please use the depends on, that way the author of the patch that might have caused the issue will also be informed and we can avoid backporting with open bugs (not in this case, but in general :))
I see the comments now and the patch! (still early here...), still useful to link :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #4)
Please use the depends on, that way the author of the patch that might have caused the issue will also be informed and we can avoid backporting with open bugs (not in this case, but in general :))
Nice one! I was so focused on bug 15516 that I forgot to link it to bug 22456 too! Thanks :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to David Cook from comment #1)
I don't know how the MySQL database is being set up in koha-testing-docker, but if "installer/data/mysql/db_revs/220600023.pl" is involved, it's clearly not working.
You can do: $ git checkout v22.05.00 -b test $ reset_all $ git checkout master $ updatedatabase and check yourself if it works or not. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138771|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 138835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138835&action=edit Bug 31303: Prevent fatal errors when missing "waiting hold cancellation" rule This patch removes method chaining which didn't account for the fact that the "waiting hold cancellation" circulation rule might not exist. Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=29 2. Search for "koha" user 3. Choose the specific item and click "Place hold" 4. Check in "39999000001310" and click "Confirm hold (Y)" 5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-holds 6. Rejoice in Koha not exploding 7. Go to http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 8. Go to "Default waiting hold cancellation policy" and change "Cancellation allowed" to "Yes" and click "Add" 9. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-holds 10. Note the "Cancel" button appears 11. Rejoice again that the "Cancel" button appeared Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 138836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138836&action=edit Bug 31303: (follow-up) Use get_effective_rule_value instead Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Thanks for taking care, David. I think my follow-up highlights what we should be doing in the codebase, in general. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- (In reply to Tomás Cohen Arazi from comment #10)
Thanks for taking care, David. I think my follow-up highlights what we should be doing in the codebase, in general.
Ah yes. Makes sense to me! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|15516 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15516 [Bug 15516] Allow to place a hold on first available item from a group of titles -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- Patchset does not apply cleanly to 22.05.x branch. If needed please rebase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31303 Bug 31303 depends on bug 22456, which changed state. Bug 22456 Summary: Allow patrons to cancel their waiting holds https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22456 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org