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. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
8239e43793
commit
8b095aaf37
3 changed files with 4 additions and 6 deletions
|
@ -375,10 +375,10 @@ sub transferbook {
|
||||||
# That'll save a database query.
|
# That'll save a database query.
|
||||||
my ( $resfound, $resrec, undef ) =
|
my ( $resfound, $resrec, undef ) =
|
||||||
CheckReserves( $itemnumber );
|
CheckReserves( $itemnumber );
|
||||||
if ( $resfound and not $ignoreRs ) {
|
if ( $resfound ) {
|
||||||
$resrec->{'ResFound'} = $resfound;
|
$resrec->{'ResFound'} = $resfound;
|
||||||
$messages->{'ResFound'} = $resrec;
|
$messages->{'ResFound'} = $resrec;
|
||||||
$dotransfer = 1;
|
$dotransfer = 0 unless $ignoreRs;
|
||||||
}
|
}
|
||||||
|
|
||||||
#actually do the transfer....
|
#actually do the transfer....
|
||||||
|
|
|
@ -127,7 +127,6 @@ defined $barcode and $barcode =~ s/^\s*|\s*$//g; # FIXME: barcodeInputFilter
|
||||||
if ($barcode) {
|
if ($barcode) {
|
||||||
|
|
||||||
( $transferred, $messages ) =
|
( $transferred, $messages ) =
|
||||||
|
|
||||||
transferbook({
|
transferbook({
|
||||||
from_branch => C4::Context->userenv->{'branch'},
|
from_branch => C4::Context->userenv->{'branch'},
|
||||||
to_branch => $tobranchcd,
|
to_branch => $tobranchcd,
|
||||||
|
@ -136,7 +135,7 @@ if ($barcode) {
|
||||||
trigger => 'Manual'
|
trigger => 'Manual'
|
||||||
});
|
});
|
||||||
my $item = Koha::Items->find({ barcode => $barcode });
|
my $item = Koha::Items->find({ barcode => $barcode });
|
||||||
$found = $messages->{'ResFound'};
|
$found = $messages->{'ResFound'} unless $settransit;
|
||||||
if ($transferred) {
|
if ($transferred) {
|
||||||
my %trsfitem;
|
my %trsfitem;
|
||||||
my $frbranchcd = C4::Context->userenv->{'branch'};
|
my $frbranchcd = C4::Context->userenv->{'branch'};
|
||||||
|
|
|
@ -67,8 +67,8 @@
|
||||||
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
|
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
|
||||||
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
|
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
|
||||||
<input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
|
<input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
|
||||||
|
<input type="hidden" name="barcode" value="[% barcode | html %]" />
|
||||||
[% IF ( waiting or transferred or processing ) %]
|
[% IF ( waiting or transferred or processing ) %]
|
||||||
<input type="hidden" name="barcode" value="[% barcode | html %]" />
|
|
||||||
<input type="hidden" name="request" value="KillWaiting" />
|
<input type="hidden" name="request" value="KillWaiting" />
|
||||||
<input type="submit" value="Cancel" />
|
<input type="submit" value="Cancel" />
|
||||||
[% END %]
|
[% END %]
|
||||||
|
@ -93,7 +93,6 @@
|
||||||
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
|
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
|
||||||
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
|
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
|
||||||
<input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
|
<input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
|
||||||
<input type="hidden" name="barcode" value="[% barcode | html %]" />
|
|
||||||
<input type="hidden" name="request" value="KillReserved" />
|
<input type="hidden" name="request" value="KillReserved" />
|
||||||
<input type="submit" value="Cancel" />
|
<input type="submit" value="Cancel" />
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue