Bugzilla – Attachment 158348 Details for
Bug 34938
Add collection column to holds ratio report (circ/reserveratios.pl)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34938: (QA follow-up) Tidy code
Bug-34938-QA-follow-up-Tidy-code.patch (text/plain), 2.78 KB, created by
Kyle M Hall (khall)
on 2023-11-03 15:59:44 UTC
(
hide
)
Description:
Bug 34938: (QA follow-up) Tidy code
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-11-03 15:59:44 UTC
Size:
2.78 KB
patch
obsolete
>From 98d92da62414d898988f2eee3be9f2df0feed15f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 3 Nov 2023 11:58:30 -0400 >Subject: [PATCH] Bug 34938: (QA follow-up) Tidy code > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > circ/reserveratios.pl | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl >index 5a20c768e2f..31528556393 100755 >--- a/circ/reserveratios.pl >+++ b/circ/reserveratios.pl >@@ -151,9 +151,9 @@ $sth->execute(@query_params); > > my @reservedata; > while ( my $data = $sth->fetchrow_hashref ) { >- my $thisratio = $data->{reservecount} / $data->{itemcount}; >- my $copies_to_buy = ceil($data->{reservecount}/$ratio - $data->{itemcount}); >- $thisratio >= $ratio or next; # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause >+ my $thisratio = $data->{reservecount} / $data->{itemcount}; >+ my $copies_to_buy = ceil( $data->{reservecount} / $ratio - $data->{itemcount} ); >+ $thisratio >= $ratio or next; # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause > push( > @reservedata, > { >@@ -169,19 +169,19 @@ while ( my $data = $sth->fetchrow_hashref ) { > itemnum => $data->{itemnumber}, > biblionumber => $data->{biblionumber}, > holdingbranch => $data->{holdingbranch}, >- homebranch_list => [split('\|', $data->{homebranch_list})], >- holdingbranch_list => [split('\|', $data->{holdingbranch_list})], >+ homebranch_list => [ split( '\|', $data->{homebranch_list} ) ], >+ holdingbranch_list => [ split( '\|', $data->{holdingbranch_list} ) ], > branch => $data->{branch}, > itemcallnumber => $data->{itemcallnumber}, >- location => [split('\|', $data->{l_location})], >- itype => [split('\|', $data->{l_itype})], >- ccode => [split('\|', $data->{l_ccode})], >+ location => [ split( '\|', $data->{l_location} ) ], >+ itype => [ split( '\|', $data->{l_itype} ) ], >+ ccode => [ split( '\|', $data->{l_ccode} ) ], > reservecount => $data->{reservecount}, > itemcount => $data->{itemcount}, > copies_to_buy => sprintf( "%d", $copies_to_buy ), >- thisratio => sprintf( "%.2f", $thisratio ), >+ thisratio => sprintf( "%.2f", $thisratio ), > thisratio_atleast1 => ( $thisratio >= 1 ) ? 1 : 0, >- listcall => [split('\|', $data->{listcall})] >+ listcall => [ split( '\|', $data->{listcall} ) ] > } > ); > } >-- >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 34938
:
156305
|
156308
|
156462
|
158347
| 158348