From 7fd6ab8ab7ccac6bdb69c0c4b34938891aa975a9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 17 Jan 2020 10:47:49 +0000 Subject: [PATCH] Bug 24436: Add handling for reserve transfer triggers --- C4/Reserves.pm | 3 ++- circ/pendingreserves.pl | 2 +- circ/waitingreserves.pl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 05d5910812..aa3844ada2 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -566,7 +566,8 @@ sub GetOtherReserves { C4::Items::ModItemTransfer( $itemnumber, $item->holdingbranch, - $checkreserves->{'branchcode'} + $checkreserves->{'branchcode'}, + 'Reserve' ), ; } diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 9f62b28b22..dc30a7ac0f 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -102,7 +102,7 @@ if ( $op eq 'cancel_reserve' and $reserve_id ) { } $hold->cancel; if ( $item->homebranch ne $item->holdingbranch ) { - C4::Items::ModItemTransfer( $item->itemnumber, $item->holdingbranch, $item->homebranch ); + C4::Items::ModItemTransfer( $item->itemnumber, $item->holdingbranch, $item->homebranch, 'LostReserve' ); } if ( my $yaml = C4::Context->preference('UpdateItemWhenLostFromHoldList') ) { diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index c78884f70e..abefc095e5 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -144,7 +144,7 @@ sub cancel { # if the document is not in his homebranch location and there is not reservation after, we transfer it if ($transfer && !$nextreservinfo) { - ModItemTransfer( $item, $fbr, $tbr ); + ModItemTransfer( $item, $fbr, $tbr, 'CancelReserve' ); } # if we have a result if ($nextreservinfo) { -- 2.20.1