Bugzilla – Attachment 139734 Details for
Bug 31112
Able to renew checkout when the number of holds exceeds available number of items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds
Bug-31112-follow-up-Dont-return-onreserve-when-the.patch (text/plain), 1.28 KB, created by
Kyle M Hall (khall)
on 2022-08-24 17:14:12 UTC
(
hide
)
Description:
Bug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-08-24 17:14:12 UTC
Size:
1.28 KB
patch
obsolete
>From b5f60ac57e20dcf4d51e2eb760e44d42e73eae40 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Mon, 22 Aug 2022 19:02:14 +0000 >Subject: [PATCH] Bug 31112: (follow-up) Don't return "on_reserve" when there > are 0 possible holds >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >It's possible that there could be 0 possible reserves, for example >when the hold has already been filled, thus the check would fail as >the item count can never be less than 0. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Circulation.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 125c0c2744..1667ec7332 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2963,7 +2963,7 @@ sub CanBookBeRenewed { > notforloan => 0, > -not => { itemnumber => $itemnumber } })->as_list; > >- return ( 0, "on_reserve" ) if scalar @other_items < scalar @possible_holds; >+ return ( 0, "on_reserve" ) if @possible_holds && (scalar @other_items < scalar @possible_holds); > > my %matched_items; > foreach my $possible_hold (@possible_holds) { >-- >2.30.2
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 31112
:
137826
|
137827
|
137828
|
137856
|
137857
|
137858
|
139492
|
139493
|
139494
|
139495
|
139622
|
139623
|
139729
|
139730
|
139731
|
139732
|
139733
| 139734 |
139735