From 32dd87ded1ccebe6685d7faade23c2722a81b9aa Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 17 May 2021 15:51:46 +0100 Subject: [PATCH] Bug 27064: (QA follow-up) Do not create transfer prior to accepting it This patch prevents the cancellations we were seeing. Transfers were being created pre-emtively for reserves in branchtransfers before the librarian had selected their prefered action. As such, we were getting double lines in the branchtransfers table. --- C4/Circulation.pm | 4 ++-- circ/branchtransfers.pl | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c42277d3b5..7a28b100c3 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -375,10 +375,10 @@ sub transferbook { # That'll save a database query. my ( $resfound, $resrec, undef ) = CheckReserves( $itemnumber ); - if ( $resfound and not $ignoreRs ) { + if ( $resfound ) { $resrec->{'ResFound'} = $resfound; $messages->{'ResFound'} = $resrec; - $dotransfer = 1; + $dotransfer = 0 unless $ignoreRs; } #actually do the transfer.... diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 59b4f24fec..fe611ab4f4 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -127,7 +127,6 @@ defined $barcode and $barcode =~ s/^\s*|\s*$//g; # FIXME: barcodeInputFilter if ($barcode) { ( $transferred, $messages ) = - transferbook({ from_branch => C4::Context->userenv->{'branch'}, to_branch => $tobranchcd, -- 2.20.1