Bugzilla – Attachment 34183 Details for
Bug 13298
Holds ratios report ignores ordered items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13298 - Holds ratios report ignores ordered items
Bug-13298---Holds-ratios-report-ignores-ordered-it.patch (text/plain), 4.30 KB, created by
Jonathan Druart
on 2014-12-08 16:20:24 UTC
(
hide
)
Description:
Bug 13298 - Holds ratios report ignores ordered items
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-12-08 16:20:24 UTC
Size:
4.30 KB
patch
obsolete
>From 0df303928b40352fe4ba776f7b5f4eff9894ab69 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 19 Nov 2014 08:16:17 -0500 >Subject: [PATCH] Bug 13298 - Holds ratios report ignores ordered items > >The holds ratio report ignores ordered items. This could cause a library >to inadvertently order more copies of a title than they actually need. >An option should be added to count ordered items ( i.e. any negative >notforloan value ). > >Test Plan: >1) Apply this patch >2) Create a record with two items, one regular, one ordered. >3) Place 3 holds on the item >4) Run the reserve ratios report, by default you should see this record >5) Check the new 'include ordered' checkbox, rerun the report >6) Note that record is no longer displayed > >Signed-off-by: Heather Braum <hbraum@nekls.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > circ/reserveratios.pl | 11 +++--- > .../prog/en/modules/circ/reserveratios.tt | 39 ++++++++++++++-------- > 2 files changed, 32 insertions(+), 18 deletions(-) > >diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl >index a08b606..f81bb7f 100755 >--- a/circ/reserveratios.pl >+++ b/circ/reserveratios.pl >@@ -33,9 +33,10 @@ use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/; > use C4::Acquisition qw/GetOrdersByBiblionumber/; > > my $input = new CGI; >-my $startdate = $input->param('from'); >-my $enddate = $input->param('to'); >-my $ratio = $input->param('ratio'); >+my $startdate = $input->param('from'); >+my $enddate = $input->param('to'); >+my $ratio = $input->param('ratio'); >+my $include_ordered = $input->param('include_ordered'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >@@ -90,6 +91,7 @@ if ($enddate) { > push @query_params, format_date_in_iso($enddate); > } > >+my $nfl_comparison = $include_ordered ? '<=' : '='; > my $strsth = > "SELECT reservedate, > reserves.borrowernumber as borrowernumber, >@@ -118,7 +120,7 @@ my $strsth = > LEFT JOIN items ON items.biblionumber=reserves.biblionumber > LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber > WHERE >- notforloan = 0 AND damaged = 0 AND itemlost = 0 AND withdrawn = 0 >+ notforloan $nfl_comparison 0 AND damaged = 0 AND itemlost = 0 AND withdrawn = 0 > $sqldatewhere > "; > >@@ -180,6 +182,7 @@ $template->param( > from => $startdate, > to => $enddate, > ratio => $ratio, >+ include_ordered => $include_ordered, > reserveloop => \@reservedata, > ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index a020052..80fe4aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -91,20 +91,31 @@ > <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" > > <fieldset class="brief"> > <h4>Refine results:</h4> >-<ol><li><label for="ratio"> >- Hold ratio: >-</label> >-<input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /></li> >-<li><label for="from"> >- Start date: >-</label> >-<input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" /> >-</li> >-<li><label for="to"> >- End date: >-</label> >-<input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" /> >-</li></ol> >+<ol> >+ <li> >+ <label for="ratio">Hold ratio:</label> >+ <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /> >+ <li> >+ >+ <li> >+ <label for="include_ordered">Included ordered:</label> >+ [% IF include_ordered %] >+ <input id="include_ordered" name="include_ordered" type="checkbox" checked="checked"/> >+ [% ELSE %] >+ <input id="include_ordered" name="include_ordered" type="checkbox"/> >+ [% END %] >+ <li> >+ >+ <li> >+ <label for="from">Start date:</label> >+ <input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" /> >+ </li> >+ >+ <li> >+ <label for="to">End date:</label> >+ <input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" /> >+ </li> >+</ol> > (inclusive) > > <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset> >-- >2.1.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 13298
:
33679
| 34183