From c8bf4d1806c1e79ac03878b05782fcd4d01bc189 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 Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- C4/Reserves.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index d291a888e6..d6121a7616 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -306,6 +306,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.30.2