https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383 --- Comment #21 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 209554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209554&action=edit Bug 42383: Add Koha::Checkin->confirm_hold This patch adds a confirm_hold() domain method to Koha::Checkin that sets the trapped hold to waiting. If the pickup library differs from the checkin library, it also creates a transfer and sets it in transit. This moves the logic out of the controller into the domain object, making it testable independently and reusable (e.g. for HoldsAutoFill). 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: - confirm_hold at same library (hold set to waiting, no transfer) - confirm_hold at different library (hold in transit, transfer created) - confirm_hold without hold_id (throws MissingParameter) 4. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.