From 0451d502bef65ff5e5334a2c62ba2f1165284758 Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Tue, 13 Sep 2016 13:23:33 +0300 Subject: [PATCH] Bug 9188 - Remove 'debug' information from patron statistics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the staff client, if you submit a report under Reports -> Statistics wizards -> Patrons you see a lot of debug info with the heading "Filtered on:". This patch fixes that by adding an extra template parameter ('filtered_on_debug') in reports/borrowers_stats.pl and setting it to 0. The relevant template file is also updated to include a conditional directive which checks for the 'filtered_on_debug' variable. Debug info will only be shown if the variable is set to something other than 0. Finally, the associated help file template is updated to reflect the changes made. Test plan: 1) In the staff client, submit a report under Reports -> Statistics wizards -> Patrons. Observe that you see a lot of debug information. 2) Apply the patch. 3) Repeat step 1. Confirm that the patch works, i.e. you no longer see the debug information. Followed test plan, works as expected. Signed-off-by: Marc VĂ©ron --- koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt | 2 ++ reports/borrowers_stats.pl | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt index 28521fe..be73701 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/borrowers_stats.tt @@ -6,7 +6,7 @@

If you choose to output to the browser your results will print to the screen.

-

Based on your selections, you may see some query information above your results table. You can also choose to export to a file that you can manipulate to your needs.

+

You can also choose to export to a file that you can manipulate to your needs.

See the full documentation for Patron Statistics in the manual (online).

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 005886d..d32c161 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 @@ -24,12 +24,14 @@ [% FOREACH mainloo IN mainloop %]

Patrons statistics

[% IF ( mainloo.loopfilter ) %] + [% IF ( filtered_on_debug ) %]

Filtered on:

[% FOREACH loopfilte IN mainloo.loopfilter %]

[% loopfilte.crit %] = [% loopfilte.filter %]

[% END %] + [% END %] [% END %] diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 2392871..76cc800 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -76,6 +76,7 @@ my ($template, $borrowernumber, $cookie) }); $template->param(do_it => $do_it); if ($do_it) { + $template->param(filtered_on_debug => 0); my $attributes; if (C4::Context->preference('ExtendedPatronAttributes')) { $attributes = parse_extended_patron_attributes($input); -- 2.1.4