Bugzilla – Attachment 121739 Details for
Bug 28527
Transfers that are cancelled whilst in transit should still appear as 'in transit' until they are received
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28527: Restore cancellation of transfers from Koha::Hold
Bug-28527-Restore-cancellation-of-transfers-from-K.patch (text/plain), 1.31 KB, created by
Martin Renvoize (ashimema)
on 2021-06-09 13:33:36 UTC
(
hide
)
Description:
Bug 28527: Restore cancellation of transfers from Koha::Hold
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-06-09 13:33:36 UTC
Size:
1.31 KB
patch
obsolete
>From 306f7aa57f077f754caeeb315e1f1e4c29f6222b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 8 Jun 2021 13:23:48 +0100 >Subject: [PATCH] Bug 28527: Restore cancellation of transfers from Koha::Hold > >This aptch restores the cancellation of the transfers in transit when a >hold is cancelled. >--- > Koha/Hold.pm | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index bd5458f494..bd7f8f0959 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -513,6 +513,14 @@ sub cancel { > my ( $self, $params ) = @_; > $self->_result->result_source->schema->txn_do( > sub { >+ if ( $self->is_in_transit ) { >+ my $transfer = $self->item->get_transfer; >+ # 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 } ); >+ } >+ } > $self->cancellationdate( dt_from_string->strftime( '%Y-%m-%d %H:%M:%S' ) ); > $self->priority(0); > $self->cancellation_reason( $params->{cancellation_reason} ); >-- >2.20.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 28527
: 121739 |
121740
|
121741
|
121742