[Koha-patches] [PATCH] Bug 8811 - can't run report after saving
Owen Leonard
oleonard at myacpl.org
Mon Sep 24 16:52:08 CEST 2012
The fix for Bug 7993 removed some lines from guided_reports.pl
which passed a new report's name and id to the template after
saving. For some reason this was removed, making it impossible
to run or edit a new report immediately after saving.
This patch adds back that part of the script which passes those
variables to the template. Before this patch, after adding a new
SQL report you would not see a "run this report" link. The
"run this report" and "edit" buttons in the toolbar would not
work. After applying the patch these should work.
---
reports/guided_reports.pl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl
index 00f52ef..de18072 100755
--- a/reports/guided_reports.pl
+++ b/reports/guided_reports.pl
@@ -501,7 +501,7 @@ elsif ( $phase eq 'Save Report' ) {
);
}
else {
- save_report( {
+ my $id = save_report( {
borrowernumber => $borrowernumber,
sql => $sql,
name => $name,
@@ -513,7 +513,11 @@ elsif ( $phase eq 'Save Report' ) {
cache_expiry => $cache_expiry,
public => $public,
} );
- $template->param( 'save_successful' => 1, );
+ $template->param(
+ 'save_successful' => 1,
+ 'reportname' => $name,
+ 'id' => $id,
+ );
}
}
--
1.7.9.5
More information about the Koha-patches
mailing list