Bugzilla – Attachment 110064 Details for
Bug 25760
Holds ratio report is not reporting on records with 1 hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25760: (follow-up) Restore use of ceil
Bug-25760-follow-up-Restore-use-of-ceil.patch (text/plain), 1.19 KB, created by
ByWater Sandboxes
on 2020-09-14 15:09:34 UTC
(
hide
)
Description:
Bug 25760: (follow-up) Restore use of ceil
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-09-14 15:09:34 UTC
Size:
1.19 KB
patch
obsolete
>From 42e7a43cd575735dd22b0309d10c7d7c7c92fc62 Mon Sep 17 00:00:00 2001 >From: Kelly McElligott <kelly@bywatersolutions.com> >Date: Mon, 14 Sep 2020 12:34:22 +0000 >Subject: [PATCH] Bug 25760: (follow-up) Restore use of ceil > >The ceiling function here ensures that partial copies are counted as full copies i.e. >if we need half a book to reach the ratio, we should report 1 book, not 0 > >Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> > >Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> >--- > circ/reserveratios.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl >index 322f2b3b0f..45af1bd419 100755 >--- a/circ/reserveratios.pl >+++ b/circ/reserveratios.pl >@@ -157,7 +157,7 @@ $sth->execute(@query_params); > my @reservedata; > while ( my $data = $sth->fetchrow_hashref ) { > my $thisratio = $data->{reservecount} / $data->{itemcount}; >- my $ratiocalc = $data->{reservecount}/$ratio - $data->{itemcount}; >+ my $ratiocalc = ceil($data->{reservecount}/$ratio - $data->{itemcount}); > $ratiocalc >= 0 or next; # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause > push( > @reservedata, >-- >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 25760
:
105907
|
110053
|
110062
|
110063
|
110064
|
114978
|
119324
|
119385
|
120750
|
120774