+ [% END # /IF (save_and_run) %]
@@ -1360,6 +1378,24 @@
+
+ [% IF (save_and_run) %]
+
+
+
+
+ [% ELSE %]
+
+
+
+
+ [% END # /IF (save_and_run) %]
--- a/reports/guided_reports.pl
+++ a/reports/guided_reports.pl
@@ -219,6 +219,7 @@ elsif ( $phase eq 'Update SQL'){
my $cache_expiry_units = $input->param('cache_expiry_units');
my $public = $input->param('public');
my $save_anyway = $input->param('save_anyway');
+ my $save_and_run = $input->param('save_and_run');
my @errors;
# if we have the units, then we came from creating a report from SQL and thus need to handle converting units
@@ -291,6 +292,7 @@ elsif ( $phase eq 'Update SQL'){
'usecache' => $usecache,
);
logaction( "REPORTS", "MODIFY", $id, "$reportname | $sql" ) if C4::Context->preference("ReportsLog");
+ print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?reports=".$id."phase=Run%20this%20report") if $save_and_run;
}
if ( $usecache ) {
$template->param(
@@ -576,6 +578,7 @@ elsif ( $phase eq 'Save Report' ) {
my $cache_expiry_units = $input->param('cache_expiry_units');
my $public = $input->param('public');
my $save_anyway = $input->param('save_anyway');
+ my $save_and_run = $input->param('save_and_run');
# if we have the units, then we came from creating a report from SQL and thus need to handle converting units
@@ -661,6 +664,7 @@ elsif ( $phase eq 'Save Report' ) {
'public' => $public,
'usecache' => $usecache,
);
+ print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?reports=".$id."phase=Run%20this%20report") if $save_and_run;
}
}
}
--