Bugzilla – Attachment 121689 Details for
Bug 28520
Cancelling a hold that is in transit hides item's transit status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28520: Don't allow simply cancelling a transfer
Bug-28520-Dont-allow-simply-cancelling-a-transfer.patch (text/plain), 2.06 KB, created by
Joonas Kylmälä
on 2021-06-07 17:13:09 UTC
(
hide
)
Description:
Bug 28520: Don't allow simply cancelling a transfer
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-06-07 17:13:09 UTC
Size:
2.06 KB
patch
obsolete
>From d4bdba47ef995d91fe32a4378b899f77c2e1f396 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Mon, 7 Jun 2021 20:02:20 +0300 >Subject: [PATCH] Bug 28520: Don't allow simply cancelling a transfer > >If we just cancel a transfer it will be in a state where we don't know >where it originated from / was last seen. Let's treat cancelled >transfers also as they would be in transit. >--- > C4/Circulation.pm | 1 - > Koha/Hold.pm | 2 +- > Koha/Item/Transfer.pm | 3 +-- > 3 files changed, 2 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f0e39b7583..aaf32ef967 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3446,7 +3446,6 @@ sub GetTransfers { > FROM branchtransfers > WHERE itemnumber = ? > AND datearrived IS NULL >- AND datecancelled IS NULL > '; > my $sth = $dbh->prepare($query); > $sth->execute($itemnumber); >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 2bdae269ec..a2d7216fdb 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -519,7 +519,7 @@ sub cancel { > # NOTE: Transfers are well bound with Holds.. as such we have to check that there is actually a > # transfer enqueued and in transit here prior to trying to cancel it. > if ( $transfer && $transfer->in_transit ) { >- $transfer->cancel({ reason => 'CancelReserve', force => 1 }); >+ $transfer->cancel({ reason => 'CancelReserve', force => 1, replace => 1 }); > } > } > $self->cancellationdate( dt_from_string->strftime( '%Y-%m-%d %H:%M:%S' ) ); >diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm >index 21d8a2938c..c10df41ad3 100644 >--- a/Koha/Item/Transfer.pm >+++ b/Koha/Item/Transfer.pm >@@ -110,8 +110,7 @@ sub in_transit { > my ($self) = @_; > > return ( defined( $self->datesent ) >- && !defined( $self->datearrived ) >- && !defined( $self->datecancelled ) ); >+ && !defined( $self->datearrived ) ); > } > > =head3 receive >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28520
:
121686
|
121689
|
121690
|
121691
|
121693
|
121708
|
121709
|
121710
|
121711
|
121712
|
121718
|
121719
|
121720
|
121721
|
121722
|
121843
|
121844
|
121845
|
121846
|
121847
|
121951
|
121952
|
121953
|
121954
|
121955
|
121985
|
122005
|
122006
|
122007