To recreate: 1 - Run the statistics wizard for a range 2 - set date as columns 3 - set itemtype as rows 4 - Row headers all come out as "UNKNOWN VALUE" Screenshot https://snag.gy/iZQRvY.jpg
I was able to reproduce this when running under Plack. Turning on warnings in issues_stats2.pl shows the problem: Variable "@filters" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 223. Variable "$itemtypes" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 309. Variable "$ccodes" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 313. Variable "$locations" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 314. Variable "$Bsort1" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 318. Variable "$Bsort2" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 323. Variable "$categoryloop" is not available at /usr/share/koha/intranet/cgi-bin/reports/issues_stats.pl line 328. ... In particular, because $itemtypes is not carried over into the calculate subroutine, no display labels are found.
Created attachment 53107 [details] [review] 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>
Created attachment 53117 [details] [review] 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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 53128 [details] [review] 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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 16.11, thanks Galen!
Thanks Kyle. RMaints, I'd also like to request backporting to 16.05.x and 3.22.x.
Pushed in 16.05. Will be in 16.05.02.
Patch pushed to 3.22.x, will be in 3.22.10
Hello, In Koha 17.X (0,1,2) This error still persists
(In reply to MetaBiblioteca Colombia from comment #9) > Hello, In Koha 17.X (0,1,2) This error still persists Please open a new bug report and describe the problem.
(In reply to Jonathan Druart from comment #10) > (In reply to MetaBiblioteca Colombia from comment #9) > > Hello, In Koha 17.X (0,1,2) This error still persists > > Please open a new bug report and describe the problem. See bug 19671