@@ -, +, @@ --- .../modules/reports/guided_reports_start.tt | 36 +++++++++++++++++++ reports/guided_reports.pl | 4 +++ 2 files changed, 40 insertions(+) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1248,6 +1248,24 @@ + + [% IF (save_and_run) %] +
  • + + +
  • + [% ELSE %] +
  • + + +
  • + [% 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; } } } --