Bugzilla – Attachment 118609 Details for
Bug 12362
Branch transfer records orphaned on cancelled holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12362: Cancel transfer with hold cancelation
Bug-12362-Cancel-transfer-with-hold-cancelation.patch (text/plain), 1.10 KB, created by
Martin Renvoize (ashimema)
on 2021-03-22 14:59:10 UTC
(
hide
)
Description:
Bug 12362: Cancel transfer with hold cancelation
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-22 14:59:10 UTC
Size:
1.10 KB
patch
obsolete
>From d662410544ae3f20e827dce320bca285e484bcc9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 22 Mar 2021 14:57:06 +0000 >Subject: [PATCH] Bug 12362: Cancel transfer with hold cancelation > >This patch adds a transfer cancellation when a hold is cancelled. >--- > Koha/Hold.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 892fb20cd5..a7be5287da 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -497,8 +497,15 @@ Cancel a hold: > > sub cancel { > my ( $self, $params ) = @_; >+ > $self->_result->result_source->schema->txn_do( > sub { >+ if ( $self->is_in_transit ) { >+ my $transfer = $self->item->get_transfer; >+ if ( $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 12362
:
118607
|
118608
|
118609
|
118611
|
118819
|
118820
|
118821
|
119762
|
119763
|
119764
|
119898
|
119899
|
119900
|
119901
|
119902