Bugzilla – Attachment 119902 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: (QA follow-up) Fix ModItemTransfer cancellation handling
Bug-12362-QA-follow-up-Fix-ModItemTransfer-cancell.patch (text/plain), 1.70 KB, created by
Martin Renvoize (ashimema)
on 2021-04-20 09:59:25 UTC
(
hide
)
Description:
Bug 12362: (QA follow-up) Fix ModItemTransfer cancellation handling
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-20 09:59:25 UTC
Size:
1.70 KB
patch
obsolete
>From 45c8f21871e883118671e05863c2a9b91ac312ea Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 20 Apr 2021 10:28:40 +0100 >Subject: [PATCH] Bug 12362: (QA follow-up) Fix ModItemTransfer cancellation > handling > >ModItemTransfer is still used, sparingly. It force cancels transfers >regardles of whether they are already marked as in_transit. We do not, >however, want to enqueue a return transfer in this case as >ModItemTransfer is itself an enqueue function. This patch updates the >internal logic of ModItemTransfer to enqueue the passed transfer prior >to cancelling the pre-existing one.. in this way the result is one >cancelled transfer and one new transfer and not three transfers. > >Test plan >1/ Run t/db_dependant/Items.t and verify it fails prior to applying this >patch >2/ Apply patch and run the test again, verifying it now passes. >--- > Koha/Item.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 049b026bc3..ab498da607 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -456,9 +456,6 @@ 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, >@@ -470,6 +467,9 @@ sub request_transfer { > } > )->store(); > >+ $request->cancel( { reason => $params->{reason}, force => 1 } ) >+ if ( defined($request) && $params->{replace} ); >+ > return $transfer; > } > >-- >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