From f9a94aca3380a19c3e7c5f82fdb6a2bd444b4e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Mon, 7 Jun 2021 20:09:40 +0300 Subject: [PATCH] Bug 28520: Don't create a new transfer for a lost item We need to pass 'replace' to cancel() method, otherwise a new transfer (request) is automatically generated back to the original sending branch. --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 6a4dbfd3d5..57082da3ed 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3880,7 +3880,7 @@ sub LostItem{ my $item = Koha::Items->find($itemnumber); my $transfers = $item->get_transfers; while (my $transfer = $transfers->next) { - $transfer->cancel({ reason => 'ItemLost', force => 1 }); + $transfer->cancel({ reason => 'ItemLost', force => 1, replace => 1 }); } } -- 2.25.1