Bugzilla – Attachment 163473 Details for
Bug 34972
Canceling a waiting hold from the holds over tab can make the next hold unfillable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34972: (follow-up) Update returns.pl to initiate item transfer directly
Bug-34972-follow-up-Update-returnspl-to-initiate-i.patch (text/plain), 2.82 KB, created by
Emily Lamancusa (emlam)
on 2024-03-19 18:35:31 UTC
(
hide
)
Description:
Bug 34972: (follow-up) Update returns.pl to initiate item transfer directly
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-03-19 18:35:31 UTC
Size:
2.82 KB
patch
obsolete
>From fc2caa27440932363132ee74a6712cd305668013 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Tue, 19 Mar 2024 14:14:27 -0400 >Subject: [PATCH] Bug 34972: (follow-up) Update returns.pl to initiate item > transfer directly > >returns.pl was relying on GetOtherReserves to update branchtransfers >when putting a hold in transit. It should be calling ModItemTransfer >directly. >--- > circ/returns.pl | 10 ++++++++++ > t/db_dependent/Circulation.t | 4 ++-- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 5b119e3726..e43c230168 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -162,9 +162,14 @@ if ( $query->param('reserve_id') && $op eq 'cud-affect_reserve') { > } # FIXME else? > } else { > my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef; >+ > # diffBranchSend tells ModReserveAffect whether document is expected in this library or not, > # i.e., whether to apply waiting status > ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id, $desk_id ); >+ >+ if ($diffBranchSend) { >+ ModItemTransfer( $itemnumber, $item->holdingbranch, $diffBranchSend, 'Reserve' ); >+ } > } > # check if we have other reserves for this document, if we have a return send the message of transfer > my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); >@@ -587,6 +592,11 @@ if ( $messages->{'ResFound'} ) { > > my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; > ModReserveAffect( $itemnumber, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id}, $desk_id ); >+ >+ if ($diffBranchSend) { >+ ModItemTransfer( $itemnumber, $item->holdingbranch, $reserve->{branchcode}, 'Reserve' ); >+ } >+ > my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber}); > > $template->param( >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 7ba50e0e12..f3a32df0b8 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -5921,8 +5921,8 @@ subtest 'Checkout should correctly terminate a transfer' => sub { > ModItemTransfer( $item->itemnumber, $library_1->branchcode, > $library_2->branchcode, 'Manual' ); > ModReserveAffect( $item->itemnumber, undef, $do_transfer, $reserve_id ); >- GetOtherReserves( $item->itemnumber ) >- ; # To put the Reason, it's what does returns.pl... >+ ModItemTransfer( $item->itemnumber, $library_1->branchcode, >+ $library_2->branchcode, 'Reserve' ); # To put the Reason, it's what does returns.pl... > my $hold = Koha::Holds->find($reserve_id); > is( $hold->found, 'T', 'Hold is in transit' ); > my $transfer = $item->get_transfer; >-- >2.34.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 34972
:
160775
|
160776
|
163471
|
163472
|
163473
|
163728
|
163729
|
163730
|
164392
|
164393
|
166024
|
166028
|
166029
|
166100
|
166101
|
166102
|
166103