Bug 28520: Revert "Bug 12362: (QA follow-up) Fix ModItemTransfer cancellation handling"

This reverts commit fbba09f63f.

This commit was part of a series adding adding reverse transfers, i.e.
transfers that were created for transfers that were cancelled and
we wanted the item to return back to its sending library. This however
hid the information about transfer happening and we need another approach
to the problem.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Joonas Kylmälä 2021-06-08 07:47:32 +00:00 committed by Kyle M Hall
parent ac8f303a15
commit e98ce2c1fb
1 changed files with 3 additions and 3 deletions

View File

@ -456,6 +456,9 @@ sub request_transfer {
Koha::Exceptions::Item::Transfer::InQueue->throw( transfer => $request )
if ( $request && !$params->{enqueue} && !$params->{replace} );
$request->cancel( { reason => $params->{reason}, force => 1 } )
if ( defined($request) && $params->{replace} );
my $transfer = Koha::Item::Transfer->new(
{
itemnumber => $self->itemnumber,
@ -467,9 +470,6 @@ sub request_transfer {
}
)->store();
$request->cancel( { reason => $params->{reason}, force => 1, replace => 1 } )
if ( defined($request) && $params->{replace} );
return $transfer;
}