Bugzilla – Attachment 82192 Details for
Bug 21346
Clean up dialogs in returns.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21346: Reroute waiting hold from wrong branch
Bug-21346-Reroute-waiting-hold-from-wrong-branch.patch (text/plain), 2.06 KB, created by
ByWater Sandboxes
on 2018-11-09 17:30:16 UTC
(
hide
)
Description:
Bug 21346: Reroute waiting hold from wrong branch
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2018-11-09 17:30:16 UTC
Size:
2.06 KB
patch
obsolete
>From f07316e2d0595af148b4d3db3869fd7704848a00 Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Wed, 7 Nov 2018 23:55:33 +0000 >Subject: [PATCH] Bug 21346: Reroute waiting hold from wrong branch > >To Test: >1) Place a hold on an item. >2) Check in the item to trigger the hold. Item is now listed as >waiting. >3) Set branch to a different library. >4) Check in the item to trigger the hold. Notice that nothing but a >local use is recorded. >5) Apply the patch. >6) Repeat steps 1-4. Notice that the hold is triggered around routed to >its original pickup location. A transfer is set and the hold status >is changed from waiting to correctly showing the item as in transit. > >Signed-off-by: Lisette <lisetteslatah@gmail.com> >--- > C4/Circulation.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 12460efbf0..77e5832337 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2016,10 +2016,15 @@ sub AddReturn { > } > > # find reserves..... >- # if we don't have a reserve with the status W, we launch the Checkreserves routine >+ # launch the Checkreserves routine to find any holds > my ($resfound, $resrec); > my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds > ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} ); >+ # if a hold is found and is waiting at another branch, change the priority back to 1 and trigger the hold (this will trigger a transfer and update the hold status properly) >+ if ( $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) { >+ ModReserve( { rank => 1, reserve_id => $resrec->{reserve_id}, branchcode => $resrec->{branchcode} } ); >+ ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} ); >+ } > if ($resfound) { > $resrec->{'ResFound'} = $resfound; > $messages->{'ResFound'} = $resrec; >-- >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 21346
:
78724
|
78726
|
78902
|
78915
|
78916
|
78942
|
78943
|
79685
|
79686
|
80879
|
81100
|
81836
|
81853
|
81921
|
81924
|
82049
|
82189
|
82190
|
82191
|
82192
|
82891
|
87625
|
87626
|
87627
|
87628
|
87894
|
87895
|
87896
|
87898