Bug 16816: Do not copy parameters used when duplicating a report
If a report is duplicated from the report list, the new report will
contain the tag (<<YEAR>> 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 <arouss1980@gmail.com>
Ran and duplicated a report, the tags remained intact.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 50a37fbf5b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
parent
28eafe0b07
commit
fefd457550
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
[% END %]
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-small" title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&sql=[% sql |uri %]&reportname=[% reportname |uri %]&notes=[% notes |uri %]">
|
||||
<a class="btn btn-small" title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&sql=[% original_sql || sql |uri %]&reportname=[% reportname |uri %]&notes=[% notes |uri %]">
|
||||
<i class="fa fa-copy"></i> Duplicate
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -632,9 +632,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};
|
||||
|
||||
|
|
@ -789,6 +789,7 @@ elsif ($phase eq 'Run this report'){
|
|||
$template->param(
|
||||
'results' => \@rows,
|
||||
'sql' => $sql,
|
||||
original_sql => $original_sql,
|
||||
'id' => $report_id,
|
||||
'execute' => 1,
|
||||
'name' => $name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue