From c36a8e832159fc7e1ef0ec24e4cde9cb793c6c4c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 13 Sep 2016 14:41:51 +0100 Subject: [PATCH] Bug 16816: Do not copy parameters used when duplicating a report MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If a report is duplicated from the report list, the new report will contain the tag (<> for instance), but from the reports results page it copies the values used for the results. Test plan: Create a new sql report with tags Duplicate it from the report list: no expected changes Run it and duplicate it: the tags must not have been replaced Signed-off-by: Andreas Roussos Ran and duplicated a report, the tags remained intact. Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit 50a37fbf5bc22bed843447be6a6603e7705fd28d) Signed-off-by: Frédéric Demians (cherry picked from commit fefd457550597e2bbcfda1317760c99852829ed2) Signed-off-by: Julian Maurice --- koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc | 2 +- reports/guided_reports.pl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc index d6bf5d1456..d598b9a952 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc @@ -19,7 +19,7 @@ [% END %] diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index bff80947b5..954b75e850 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -630,9 +630,9 @@ elsif ($phase eq 'Run this report'){ 'report_id' => $report_id, ); - my ( $sql, $type, $name, $notes ); + my ( $sql, $original_sql, $type, $name, $notes ); if (my $report = get_saved_report($report_id)) { - $sql = $report->{savedsql}; + $sql = $original_sql = $report->{savedsql}; $name = $report->{report_name}; $notes = $report->{notes}; @@ -787,6 +787,7 @@ elsif ($phase eq 'Run this report'){ $template->param( 'results' => \@rows, 'sql' => $sql, + original_sql => $original_sql, 'id' => $report_id, 'execute' => 1, 'name' => $name, -- 2.39.5