https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383

--- Comment #22 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209555
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209555&action=edit
Bug 42383: Add Koha::Checkin->cancel_hold

This patch adds a cancel_hold() domain method to Koha::Checkin that
cancels the trapped hold and clears the hold_id on the checkin record.

Accepts an optional hashref with a 'reason' key for the cancellation
reason (authorised value from HOLD_CANCELLATION).

Throws Koha::Exceptions::MissingParameter if the checkin has no hold_id.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Koha/Checkin.t
=> SUCCESS: Tests pass
3. Tests cover:
   - cancel_hold without reason (no notification)
   - cancel_hold with reason (letter warning expected, reason stored)
   - cancel_hold without hold_id (throws MissingParameter)
4. Sign off :-D

Signed-off-by: Tomás Cohen Arazi <[email protected]>
Signed-off-by: Brendan Lawlor <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to