From 41f64e0b82094aa23381a68f6033a3a49d711f3a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 30 Jan 2020 10:29:05 -0500 Subject: [PATCH] Bug 24547: Add more action logs for holds It seems like ModReserveFill and ModReserveAffect should both produce action logs for holds. Test Plan: 1) Apply this patch 2) Place a hold 3) Check in the item to trap the hold 4) Check out the item to fill the hold 5) Check the action logs for that reserve id 6) Note the new logs! Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit d3e3a3757dc3e9d97e3204767409e1d39d637255) Signed-off-by: Lucas Gass --- C4/Reserves.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index b8951f3991..df83c06d4f 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -992,6 +992,9 @@ sub ModReserveFill { } ); + logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) + if C4::Context->preference('HoldsLog'); + # FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log Koha::Old::Hold->new( $hold->unblessed() )->store(); @@ -1089,6 +1092,9 @@ sub ModReserveAffect { CartToShelf( $itemnumber ); } + logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) + if C4::Context->preference('HoldsLog'); + return; } -- 2.39.5