Bugzilla – Attachment 99166 Details for
Bug 21944
Fix waiting holds at wrong location bug
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21944: Reroute waiting hold from wrong branch
Bug-21944-Reroute-waiting-hold-from-wrong-branch.patch (text/plain), 2.42 KB, created by
Jonathan Druart
on 2020-02-18 10:39:16 UTC
(
hide
)
Description:
Bug 21944: Reroute waiting hold from wrong branch
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-18 10:39:16 UTC
Size:
2.42 KB
patch
obsolete
>From 7536d5d733b64854674c350d068ed96c7b7743e9 Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Tue, 4 Dec 2018 16:38:34 +0000 >Subject: [PATCH] Bug 21944: 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: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Circulation.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index dc12cd3352..6b2c91eec5 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2073,10 +2073,17 @@ 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} ) { >+ C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } ); >+ #If the hold is reverted we need to refetch for the return values >+ ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); >+ } >+ ($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 21944
:
82848
|
82852
|
83144
|
84752
|
84753
|
84754
|
92609
|
92610
|
94220
|
94221
|
95950
|
95951
|
95952
|
98528
|
98529
|
98530
|
99165
| 99166 |
99167