Bugzilla – Attachment 77644 Details for
Bug 21005
Missing row/column defaults cause unexpected results in report wizards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21005: Missing row/column defaults cause unexpected results in report wizards
Bug-21005-Missing-rowcolumn-defaults-cause-unexpec.patch (text/plain), 6.17 KB, created by
David Cook
on 2018-08-10 08:27:25 UTC
(
hide
)
Description:
Bug 21005: Missing row/column defaults cause unexpected results in report wizards
Filename:
MIME Type:
Creator:
David Cook
Created:
2018-08-10 08:27:25 UTC
Size:
6.17 KB
patch
obsolete
>From 534e3762a55832a202da450b1edca4fdf4bdbb6b Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >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 @@ > <tr> > <td>Patron category</td> > <td><input type="radio" name="Line" value="categorycode" /></td> >- <td><input type="radio" name="Column" value="categorycode" /></td> >+ <td><input type="radio" checked="checked" name="Column" value="categorycode" /></td> > <td> > <select name="Filter" size="1" id="catcode"> > <option value=""></option> >@@ -138,7 +138,7 @@ > > <tr> > <td>Library</td> >- <td><input type="radio" name="Line" value="branchcode" /></td> >+ <td><input type="radio" checked="checked" name="Line" value="branchcode" /></td> > <td><input type="radio" name="Column" value="branchcode" /></td> > <td> > <select name="Filter" size="1" id="branch"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >index f47b00e2c9..b84cfee85c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >@@ -100,7 +100,7 @@ > <tr> > <td>Item type</td> > <td><input type="radio" name="Line" value="[% item_itype %]" /></td> >- <td><input type="radio" name="Column" value="[% item_itype %]" /></td> >+ <td><input type="radio" checked="checked" name="Column" value="[% item_itype %]" /></td> > <td><select name="Filter" id="[% item_itype %]"> > <option value=""> </option> > [% FOREACH itemtype IN itemtypes %] >@@ -123,7 +123,7 @@ > </tr> > <tr> > <td>Home library</td> >- <td><input type="radio" name="Line" value="items.homebranch" /></td> >+ <td><input type="radio" checked="checked" name="Line" value="items.homebranch" /></td> > <td><input type="radio" name="Column" value="items.homebranch" /></td> > <td><select name="Filter" id="branch"> > <option value=""> </option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >index 32871a5cc2..a541df0a0d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >@@ -78,7 +78,7 @@ > <tr class="hilighted"> > <td>Checkout date</td> > <td><input type="radio" name="Line" value="timestamp" /></td> >- <td><input type="radio" name="Column" value="timestamp" /></td> >+ <td><input type="radio" checked="checked" name="Column" value="timestamp" /></td> > <td > <label for="from">From</label> <input type="text" size="10" id="from" name="Filter" /> > <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> >@@ -119,7 +119,7 @@ > </tr> > <tr class="hilighted"> > <td>Patron category</td> >- <td><input type="radio" name="Line" value="borrowers.categorycode" /></td> >+ <td><input type="radio" checked="checked" name="Line" value="borrowers.categorycode" /></td> > <td><input type="radio" name="Column" value="borrowers.categorycode" /></td> > <td> > <select name="Filter" size="1" id="borcat"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >index f7ff19f132..108f3a5b10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >@@ -165,7 +165,7 @@ > <tr> > <td>Item type</td> > <td><input type="radio" name="Line" value="itemtype" /></td> >- <td><input type="radio" name="Column" value="itemtype" /></td> >+ <td><input type="radio" checked="checked" name="Column" value="itemtype" /></td> > <td><select name="Filter" id="itemtype"> > <option value=""> </option> > [% FOREACH itemtype IN itemtypes %] >@@ -176,7 +176,7 @@ > </tr> > <tr> > <td>Issuing library</td> >- <td><input type="radio" name="Line" value="branch" /></td> >+ <td><input type="radio" checked="checked" name="Line" value="branch" /></td> > <td><input type="radio" name="Column" value="branch" /></td> > <td><select name="Filter" id="branch"> > <option value=""> </option> >-- >2.13.6
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 21005
:
77644
|
80686
|
80687
|
80740
|
80741