Bugzilla – Attachment 107586 Details for
Bug 18958
If patron has multiple record level holds on one record transferring first hold causes next hold to become item level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18958: (follow-up) Also find waiting holds for the current item/patron
Bug-18958-follow-up-Also-find-waiting-holds-for-th.patch (text/plain), 2.93 KB, created by
Kyle M Hall (khall)
on 2020-07-30 12:45:55 UTC
(
hide
)
Description:
Bug 18958: (follow-up) Also find waiting holds for the current item/patron
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-07-30 12:45:55 UTC
Size:
2.93 KB
patch
obsolete
>From 6eacc2be3dc0c8102ec172c23d8565d4daa31f0a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 30 Jul 2020 12:36:24 +0000 >Subject: [PATCH] Bug 18958: (follow-up) Also find waiting holds for the > current item/patron > >In the first patch we deal with the situation where the pickup location doesn't match the checked in location >This patch takes care fo the situation for holds not being transferred > >Same test plan, but holds and items can all be for single library > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Reserves.pm | 2 +- > t/db_dependent/Reserves.t | 12 +++++++++++- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 3962a95d70..017f846268 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1685,7 +1685,7 @@ sub _Findgroupreserve { > FROM reserves > JOIN biblioitems USING (biblionumber) > JOIN hold_fill_targets USING (biblionumber, borrowernumber) >- WHERE ( ( found IS NULL AND priority > 0 ) OR found='T' ) >+ WHERE ( ( found IS NULL AND priority > 0 ) OR found IN ('T','W') ) > AND item_level_request = 0 > AND hold_fill_targets.itemnumber = ? > AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY) >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 7b8650689a..9dac8dc758 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -1080,7 +1080,7 @@ subtest 'RevertWaitingStatus' => sub { > > subtest 'CheckReserves additional test' => sub { > >- plan tests => 3; >+ plan tests => 6; > > my $biblio = $builder->build_sample_biblio(); > my $itype = $builder->build_object({ class => "Koha::ItemTypes", value => { notforloan => 0 } }); >@@ -1134,6 +1134,7 @@ subtest 'CheckReserves additional test' => sub { > } > }); > >+ # We set one reserve in transit - equivalent to checking it in at another branch and confirming transfer > ModReserveAffect( $item_1->itemnumber, $reserve1->borrowernumber, 1, $reserve1->reserve_id ); > my ($status, $matched_reserve, $possible_reserves) = CheckReserves($item_1->itemnumber); > >@@ -1141,6 +1142,15 @@ subtest 'CheckReserves additional test' => sub { > is( $matched_reserve->{reserve_id}, $reserve1->reserve_id, "We got the Transit reserve"); > is( scalar @$possible_reserves, 1, 'We only get the one matched'); > >+ >+ # We set the reserve to waiting - equivalent to checking it in at pickup location and confirming >+ ModReserveAffect( $item_1->itemnumber, $reserve1->borrowernumber, 0, $reserve1->reserve_id ); >+ ($status, $matched_reserve, $possible_reserves) = CheckReserves($item_1->itemnumber); >+ >+ is( $status, 'Waiting', "We found a reserve" ); >+ is( $matched_reserve->{reserve_id}, $reserve1->reserve_id, "We got the Waiting reserve"); >+ is( scalar @$possible_reserves, 1, 'We only get the one matched'); >+ > }; > > sub count_hold_print_messages { >-- >2.24.1 (Apple Git-126)
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 18958
:
65104
|
65150
|
65184
|
71164
|
71232
|
72210
|
72211
|
72348
|
72349
|
92159
|
92160
|
93106
|
93107
|
93108
|
93111
|
93112
|
93113
|
93216
|
93217
|
93218
|
107576
|
107577
|
107582
|
107584
|
107585
|
107586
|
108256
|
108274
|
108473
|
108474
|
108497
|
108499
|
108500
|
108936
|
108937
|
109061
|
109222
|
109640
|
109641
|
109642
|
109643
|
109644
|
109645