Bug 21005 - Missing row/column defaults cause unexpected results in report wizards
Summary: Missing row/column defaults cause unexpected results in report wizards
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: David Cook
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-27 00:18 UTC by David Cook
Modified: 2018-11-28 09:18 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 21005: Missing row/column defaults cause unexpected results in report wizards (6.17 KB, patch)
2018-08-10 08:27 UTC, David Cook
Details | Diff | Splinter Review
Bug 21005: Missing row/column defaults cause unexpected results in report wizards (6.25 KB, patch)
2018-10-17 01:41 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 21005: Address QA tool failures on tabs (4.28 KB, patch)
2018-10-17 01:41 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 21005: Missing row/column defaults cause unexpected results in report wizards (6.32 KB, patch)
2018-10-17 16:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21005: Address QA tool failures on tabs (4.36 KB, patch)
2018-10-17 16:39 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2018-06-27 00:18:05 UTC
Some report wizards have radio buttons selected by default and some do not.

If someone tries to run a report wizard that has no radio buttons selected, fatal errors are generated.

This can be fixed just be pre-selecting radio buttons on those reports without them.
Comment 1 David Cook 2018-07-25 08:48:50 UTC
I'm planning on fixing this one soon.
Comment 2 David Cook 2018-08-10 08:27:25 UTC
Created attachment 77644 [details] [review]
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
Comment 3 Dilan Johnpullé 2018-09-24 00:46:38 UTC
Error results when applying patch:

vagrant@kohadevbox:kohaclone(master)$ git bz apply -s 21005
Bug 21005 - Missing row/column defaults cause unexpected results in report wizards

77644 - Bug 21005: Missing row/column defaults cause unexpected results in report wizards

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 21005: Missing row/column defaults cause unexpected results in report wizards
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt
M	koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt
M	koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt
M	koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt
Failed to merge in the changes.
Patch failed at 0001 Bug 21005: Missing row/column defaults cause unexpected results in report wizards
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-21005-Missing-rowcolumn-defaults-cause-unexpec-XprggD.patch
Comment 4 M. Tompsett 2018-10-17 01:41:54 UTC
Created attachment 80686 [details] [review]
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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 5 M. Tompsett 2018-10-17 01:41:57 UTC
Created attachment 80687 [details] [review]
Bug 21005: Address QA tool failures on tabs

Only whitespace changes.
Comment 6 Jonathan Druart 2018-10-17 16:39:45 UTC
Created attachment 80740 [details] [review]
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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2018-10-17 16:39:50 UTC
Created attachment 80741 [details] [review]
Bug 21005: Address QA tool failures on tabs

Only whitespace changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Nick Clemens 2018-10-19 17:31:57 UTC
Awesome work all!

Pushed to master for 18.11
Comment 9 Martin Renvoize 2018-11-05 15:54:56 UTC
Pushed to 18.05.x for 18.05.06
Comment 10 Fridolin SOMERS 2018-11-28 09:18:58 UTC
Pushed to 17.11.x for 17.11.13