Bugzilla – Attachment 108278 Details for
Bug 26078
"Item returns to issuing library" creates infinite transfer loop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26078: (follow-up) used validTransfer instead of checking WrongTransfer message
Bug-26078-follow-up-used-validTransfer-instead-of-.patch (text/plain), 2.16 KB, created by
Nick Clemens
on 2020-08-14 13:35:11 UTC
(
hide
)
Description:
Bug 26078: (follow-up) used validTransfer instead of checking WrongTransfer message
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2020-08-14 13:35:11 UTC
Size:
2.16 KB
patch
obsolete
>From 41226df529e934ca796a352b462be5cf5b36d5e3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 14 Aug 2020 13:34:43 +0000 >Subject: [PATCH] Bug 26078: (follow-up) used validTransfer instead of checking > WrongTransfer message > >--- > C4/Circulation.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index c7e9b9e37e..8474df45b8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2077,14 +2077,14 @@ sub AddReturn { > # if we have a transfer to do, we update the line of transfers with the datearrived > my $is_in_rotating_collection = C4::RotatingCollections::isItemInAnyCollection( $item->itemnumber ); > if ($datesent) { >+ # At this point we will either fill the transfer or it is a wrong transfer >+ # either way we should not now generate a new transfer >+ $validTransfer = 0; > if ( $tobranch eq $branch ) { > my $sth = C4::Context->dbh->prepare( > "UPDATE branchtransfers SET datearrived = now() WHERE itemnumber= ? AND datearrived IS NULL" > ); > $sth->execute( $item->itemnumber ); >- >- # If we are completing a transfer we should not generate a new transfer from return policy >- $validTransfer = 0; > } else { > $messages->{'WrongTransfer'} = $tobranch; > $messages->{'WrongTransferItem'} = $item->itemnumber; >@@ -2211,7 +2211,7 @@ sub AddReturn { > } > > # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer >- if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){ >+ if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) ){ > my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode'; > if (C4::Context->preference("AutomaticItemReturn" ) or > (C4::Context->preference("UseBranchTransferLimits") and >-- >2.11.0
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 26078
:
107597
|
107625
|
108188
|
108259
|
108278
|
108496