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!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2024-11-19 18:28:30 +00:00 committed by Katrin Fischer
parent 459be64976
commit 5dad538b40
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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
);