From 6053e77a6bf3137d02e82ec5d9bdd223515611ea Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 12 Jun 2020 10:51:36 +0000 Subject: [PATCH] Bug 25724: Do not call ModReserveStatus when completing transfer I can not see how this code is useful here. It checks for a reserve with priority 0 and found = NULL That is not a status that should occur when filling a transfer. Either the found is 'T' if we are transferring due to the hold, or the hold was placed after the transfer was initiated, and so the priority is not 0 Additional, AddReturn checks for reserves later and asks the staff to confirm waiting status. ModReserveStatus also calls CartToShelf regardless of what happens here. To test: 1 - Set UpdateItemLocationOnCheckin to: _ALL_: CART 2 - SetAutomaticItemReturn = Do 3 - Check an item in at a different branch than it's homebranch to create a transfer 4 - Check the item in at it's homebranch 5 - View the item details page 6 - Item is not in CART location 7 - Apply patch 8 - Repeat 9 - Item is in CART location after completion of transfer --- C4/Circulation.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 7a3b21b903..f44c19a642 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2020,8 +2020,6 @@ sub AddReturn { "UPDATE branchtransfers SET datearrived = now() WHERE itemnumber= ? AND datearrived IS NULL" ); $sth->execute( $item->itemnumber ); - # if we have a reservation with valid transfer, we can set it's status to 'W' - C4::Reserves::ModReserveStatus($item->itemnumber, 'W'); } else { $messages->{'WrongTransfer'} = $tobranch; $messages->{'WrongTransferItem'} = $item->itemnumber; -- 2.11.0