From 534e3762a55832a202da450b1edca4fdf4bdbb6b Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 10 Aug 2018 18:08:13 +1000 Subject: [PATCH] Bug 21005: Missing row/column defaults cause unexpected results in report wizards Some report wizards are missing row/column defaults, which sometimes return blank pages (borrowers_stats.pl) or results always equalling 0, which a non-discerning user may interpret incorrectly. If the DEBUG environmental variable is enabled, missing row/column choices will actually cause fatal software errors as well, which is also undesirable for users. This patch adds default choices for row and column on report wizards that had no radio buttons selected, so that a user can't submit the form without choosing a row and column. This prevents errors. To test: 1) Apply patch 2) Visit /cgi-bin/koha/reports/issues_avg_stats.pl 3) Visit /cgi-bin/koha/reports/borrowers_stats.pl 4) Visit /cgi-bin/koha/reports/catalogue_stats.pl 5) Visit /cgi-bin/koha/reports/issues_stats.pl 6) Observe that default choices for row/column are there --- koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt index 95c78f5dd1..e3acea6f94 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt @@ -78,7 +78,7 @@ Patron category - + + - + + - + [% INCLUDE 'date-format.inc' %] @@ -119,7 +119,7 @@ Patron category - + - + +