[Bug 14797] Cancelling orders with no alert to existing holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14797 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 212630 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212630&action=edit Bug 14797: Warn about holds, and offer to cancel them, when cancelling an order When an order line is cancelled from a basket, any holds that patrons placed on its on-order items were left behind without a word. The items could not be deleted while the holds existed, the holds could no longer be filled, and staff had no prompt to contact the patrons. The cancel confirmation page now lists the patrons whose holds could no longer be filled once the order is cancelled (holds on the order's own items, and record level holds when nothing else would be left to fill them), using Koha::Acquisition::Order->holds_orphaned_by_cancellation added by bug 44187. A librarian with the permission to cancel holds can tick "Cancel these holds and tell the patrons" and choose a HOLD_CANCELLATION reason. The holds are then cancelled first, so the items can be deleted, and the patrons are sent the HOLD_CANCELLATION notice when the library has defined one. A reason is required, as it is what tells the patrons why, and the page warns when no notice exists. The result page reports how many holds were cancelled and whether the patrons were notified. Without ticking the box, or without the permission, the holds are left as they were and nothing else changes. The page also treated any message from Order->cancel() as a failure; the holds_cancelled message added by bug 44187 is now recognised as a success. To test: 1. Apply bug 44187 first. Set AcqCreateItem to "placing an order". 2. Add reasons to the HOLD_CANCELLATION authorized value category (or load the optional sample authorized values), and define the HOLD_CANCELLATION notice in Tools > Notices & slips (Holds module, email). 3. Create a basket and order a title with an item. Place a hold on it for a patron who has an email address. 4. Reopen the basket if needed and choose "Cancel order". Confirm the page lists the patron under "Holds on this title". 5. Tick "Cancel these holds and tell the patrons" without choosing a reason and confirm: you are asked to choose a reason and nothing is cancelled. 6. Choose a reason and confirm. The order is cancelled, the hold is cancelled with that reason, the item is deleted, and the page says the patron has been sent the notice (check the notices queue). 7. Repeat with a new order and leave the box unticked: the order is cancelled as before and the hold and item remain. 8. Repeat as a librarian who can manage orders but cannot cancel holds: the holds are listed, with a note that you cannot cancel them, and no option. 9. Cancel an order for a title with no holds: no holds section is shown. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org