Bugzilla – Attachment 53107 Details for
Bug 16760
Circulation Statistics wizard not populating itemtype correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16760: fix Circulation Statistics wizard under Plack
Bug-16760-fix-Circulation-Statistics-wizard-under-.patch (text/plain), 3.23 KB, created by
Galen Charlton
on 2016-07-05 16:29:27 UTC
(
hide
)
Description:
Bug 16760: fix Circulation Statistics wizard under Plack
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2016-07-05 16:29:27 UTC
Size:
3.23 KB
patch
obsolete
>From 96b5572cd33fe79b5fbc0dca08dbd0d4b3ad1ef0 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmcharlt@gmail.com> >Date: Tue, 5 Jul 2016 16:22:39 +0000 >Subject: [PATCH] Bug 16760: fix Circulation Statistics wizard under Plack > >This patch fixes some variable scoping problems when running >the circulation statistics wizard under Plack. For example, >when using the item type as a row header, with this patch the >item type description is displayed rather than "UKNOWN VALUE". > >This patch also enables warnings and fixes a couple variable >initialization issues. (Note that turning on warnings across >the board would make it easier to identify Plack variable scoping >issues, as "Variable "$foo" is not available at' errors would >be recorded in the Plack error log). > >To test >------- >[1] Run the staff interface under Plack. >[2] Go to the Circulation Statistics Wizard and run a report > using item type as the row. Note that the row labels > display as "UNKNOWN VALUE" rather than the item type. >[3] Apply the patch and restart Plack. >[4] Run step #2 again; this time, the item type descriptions should > be used as the row labels. > >Signed-off-by: Galen Charlton <gmcharlt@gmail.com> >--- > reports/issues_stats.pl | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl >index 34911b2..0de1a85 100755 >--- a/reports/issues_stats.pl >+++ b/reports/issues_stats.pl >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use strict; >-#use warnings; FIXME - Bug 2505 >+use warnings; > > use CGI qw ( -utf8 ); > use Date::Manip; >@@ -45,7 +45,7 @@ Plugin that shows circulation stats > =cut > > # my $debug = 1; # override for now. >-my $input = new CGI; >+my $input = CGI->new; > my $fullreportname = "reports/issues_stats.tt"; > my $do_it = $input->param('do_it'); > my $line = $input->param("Line"); >@@ -70,19 +70,19 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ > flagsrequired => {reports => '*'}, > debug => 0, > }); >-our $sep = $input->param("sep"); >+our $sep = $input->param("sep") // ''; > $sep = "\t" if ($sep eq 'tabulation'); > $template->param(do_it => $do_it, > ); > >-my $itemtypes = GetItemTypes(); >-my $categoryloop = GetBorrowercategoryList; >+our $itemtypes = GetItemTypes(); >+our $categoryloop = GetBorrowercategoryList; > >-my $ccodes = GetKohaAuthorisedValues("items.ccode"); >-my $locations = GetKohaAuthorisedValues("items.location"); >+our $ccodes = GetKohaAuthorisedValues("items.ccode"); >+our $locations = GetKohaAuthorisedValues("items.location"); > >-my $Bsort1 = GetAuthorisedValues("Bsort1"); >-my $Bsort2 = GetAuthorisedValues("Bsort2"); >+our $Bsort1 = GetAuthorisedValues("Bsort1"); >+our $Bsort2 = GetAuthorisedValues("Bsort2"); > my ($hassort1,$hassort2); > $hassort1=1 if $Bsort1; > $hassort2=1 if $Bsort2; >@@ -219,8 +219,8 @@ sub calculate { > push @loopfilter,{crit=>"Select Month",filter=>$monthsel} if ($monthsel); > > my @linefilter; >- $debug and warn "filtres ". join "|", @filters; >- my ($colsource, $linesource); >+ $debug and warn "filtres ". join "|", @$filters; >+ my ($colsource, $linesource) = ('', ''); > $linefilter[1] = @$filters[1] if ($line =~ /datetime/); > $linefilter[0] = > ( $line =~ /datetime/ ) ? @$filters[0] >-- >2.1.4
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 16760
:
53107
|
53117
|
53128