From a3bbfda82700f4a5a0b6f90208ea8565d38d4057 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 19 Nov 2024 18:28:30 +0000 Subject: [PATCH] Bug 28294: (follow-up) Adjust call to request transfer The call expects a library object, not a branchcode, likely rebasing issue To test: 1 - Place a hold for an item at a different library than current library 2 - Check item in and confirm transfer 3 - Check item in again 4 - Kaboom! 5 - Apply patch/restart_all 6 - Check item in again 7 - Ok! --- circ/returns.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ/returns.pl b/circ/returns.pl index b064b189ebd..9f2e52dab18 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -586,7 +586,7 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { my $item = Koha::Items->find($messages->{'WrongTransferItem'}); my $old_transfer = $item->get_transfer; my $new_transfer = $item->request_transfer( - { to => $old_transfer->tobranch, reason => $old_transfer->reason, replace => 'WrongTransfer' } ); + { to => $old_transfer->to_library, reason => $old_transfer->reason, replace => 'WrongTransfer' } ); $template->param( NewTransfer => $new_transfer->id ); -- 2.39.5