From d2d892bfb64b1be9bd5993bd5244028fa0f49ed1 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 25 Feb 2022 05:50:20 -0300 Subject: [PATCH] Bug 30180: Add 'placed' after_hold_hook This patch adds a new 'after_hold_action' hook, that is called with the 'placed' action parameter. To test: 1. Apply the unit tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Plugins/Holds_hooks.t => FAIL: Boo, the hook is not called 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi --- C4/Reserves.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 6e86857db8..d5d73af7b7 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -305,6 +305,13 @@ sub AddReserve { } Koha::Plugins->call('after_hold_create', $hold); + Koha::Plugins->call( + 'after_hold_action', + { + action => 'place', + payload => { hold => $hold->get_from_storage } + } + ); return $reserve_id; } -- 2.35.1