Bug 39750 fixed the case of a transfer with no hold - it seems the same problem can occur when the transfer is for a hold: Line 178 of returns.pl my $hold = Koha::Holds->find($reserve_id); if ($diffBranchSend) { my $tobranch = $hold->pickup_library(); # Add transfer, enqueue if one is already in the queue, and immediately set to in transit my $transfer = $item->request_transfer( { to => $tobranch, reason => 'Reserve', enqueue => 1 } ); $transfer->transit; }
Created attachment 190585 [details] [review] Bug 40771: Fix error in the case of AutoFill Similar to previous patches we need to ignore limits to return a reserve where it belongs To test: 1 - Set sysprefs: UseBranchTransferLimits/BranchTransferLimitsType: To Enforce based on collection HoldsAutoFill: Do 2 - Administration->Library Transfer limits click (Advanced editor) 3 - Uncheck Centerville->Fairfield for 'Fiction' 4 - Find or create a Fiction item at centerville 5 - Place a hold on the item for a patron to pickup at Centerville 6 - Check the item in at Centerville 7 - Switch branch to Fairfield 8 - Check in the item 9 - Boom! Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed' 10 - Apply patch, restart all 11 - Check in the item at Fairfield 12 - Correctly transferred to Centerville
Created attachment 190586 [details] [review] Bug 40771: Fix transfer error when not auto filling hold This patch is another occurence where correcting a reserve transfer requires ignoring limits To test: 1 - Follow previous test plan 2 - Disable HoldsAutoFill 3 - Set library to Centerville 4 - Check the item in and confirm hold 5 - Set library to Fairfield 6 - Check the item in and confirm transfer 7 - Boom! Same error as before 8 - Apply this patch, restart all 9 - Check item in 10 - Correctly transferred to Centerville
Created attachment 190587 [details] [review] Bug 40771: Fix error in the case of AutoFill Similar to previous patches we need to ignore limits to return a reserve where it belongs To test: 1 - Set sysprefs: UseBranchTransferLimits/BranchTransferLimitsType: To Enforce based on collection HoldsAutoFill: Do 2 - Administration->Library Transfer limits click (Advanced editor) 3 - Uncheck Centerville->Fairfield for 'Fiction' 4 - Find or create a Fiction item at centerville 5 - Place a hold on the item for a patron to pickup at Centerville 6 - Check the item in at Centerville 7 - Switch branch to Fairfield 8 - Check in the item 9 - Boom! Exception 'Koha::Exceptions::Item::Transfer::Limit' thrown 'Transfer not allowed' 10 - Apply patch, restart all 11 - Check in the item at Fairfield 12 - Correctly transferred to Centerville Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 190588 [details] [review] Bug 40771: Fix transfer error when not auto filling hold This patch is another occurence where correcting a reserve transfer requires ignoring limits To test: 1 - Follow previous test plan 2 - Disable HoldsAutoFill 3 - Set library to Centerville 4 - Check the item in and confirm hold 5 - Set library to Fairfield 6 - Check the item in and confirm transfer 7 - Boom! Same error as before 8 - Apply this patch, restart all 9 - Check item in 10 - Correctly transferred to Centerville Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Trivial, self SO