Bugzilla – Attachment 186803 Details for
Bug 40529
Update how hold groups work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40529: (QA follow-up): Add skip logic to GetPendingHoldRequestsForBib
Bug-40529-QA-follow-up-Add-skip-logic-to-GetPendin.patch (text/plain), 1.98 KB, created by
Pedro Amorim
on 2025-09-23 13:50:42 UTC
(
hide
)
Description:
Bug 40529: (QA follow-up): Add skip logic to GetPendingHoldRequestsForBib
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-09-23 13:50:42 UTC
Size:
1.98 KB
patch
obsolete
>From ad41a78e3879ae3538e1dd753ebae070b9198fc9 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 23 Sep 2025 13:48:05 +0000 >Subject: [PATCH] Bug 40529: (QA follow-up): Add skip logic to > GetPendingHoldRequestsForBib > >This fixes the issue reported by Andrew on comment 23. >Following the scenario he describes, the hold should now still appear, but attached to the correct patron (Patron B). >This was an oversight as I wasn't aware of GetPendingHoldRequestsForBib and had only added the skip logic to GetBibsWithPendingHoldRequests. >--- > C4/HoldsQueue.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index d33f858655b..e7696725bdc 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -267,7 +267,6 @@ sub GetBibsWithPendingHoldRequests { > > $sth->execute(); > my $biblionumbers = $sth->fetchall_arrayref(); >- > return [ map { $_->[0] } @$biblionumbers ]; > } > >@@ -299,6 +298,9 @@ sub GetPendingHoldRequestsForBib { > > my $dbh = C4::Context->dbh; > >+ my $skip_non_target_holds_query = Koha::HoldGroup::skip_non_target_holds_query('sql'); >+ my $skip_non_target_holds_query_sql = $skip_non_target_holds_query ? " $skip_non_target_holds_query" : ''; >+ > my $request_query = "SELECT biblionumber, borrowernumber, itemnumber, priority, reserve_id, reserves.branchcode, > reservedate, reservenotes, borrowers.branchcode AS borrowerbranch, itemtype, item_level_hold, item_group_id > FROM reserves >@@ -309,6 +311,7 @@ sub GetPendingHoldRequestsForBib { > AND reservedate <= CURRENT_DATE() > AND suspend = 0 "; > $request_query .= "AND reserve_id NOT IN (SELECT reserve_id FROM hold_fill_targets) " if $unallocated; >+ $request_query .= $skip_non_target_holds_query_sql; > $request_query .= "ORDER BY priority"; > my $sth = $dbh->prepare($request_query); > $sth->execute($biblionumber); >-- >2.39.5
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 40529
:
184868
|
184869
|
184870
|
184871
|
184872
|
185137
|
185138
|
185139
|
185140
|
185141
|
185210
|
185211
|
185212
|
185213
|
185214
|
185215
|
185303
|
185304
|
185305
|
185306
|
185307
|
186793
|
186794
|
186795
|
186796
|
186797
|
186798
|
186803
|
186804
|
186825
|
186826
|
186827
|
186828
|
186829
|
186830
|
186831
|
186832