]> git.koha-community.org Git - koha.git/commit
Bug 31303: Prevent fatal errors when missing "waiting hold cancellation" rule
authorDavid Cook <dcook@prosentient.com.au>
Mon, 8 Aug 2022 05:07:47 +0000 (05:07 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 8 Aug 2022 16:20:21 +0000 (13:20 -0300)
commit38ef4f635d6be3118fc1a43d5d053e9c22bcee73
tree8997b88fe66bd01674c995bd067867ea61ea2e13
parentd673d7efdcdffe425722962336f8dc7f9f8940f0
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>
Koha/Hold.pm