Bugzilla – Attachment 55532 Details for
Bug 16816
Duplicate button on report results copies parameters used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16816: Do not copy parameters used when duplicating a report
Bug-16816-Do-not-copy-parameters-used-when-duplica.patch (text/plain), 2.66 KB, created by
Jonathan Druart
on 2016-09-13 13:45:45 UTC
(
hide
)
Description:
Bug 16816: Do not copy parameters used when duplicating a report
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-13 13:45:45 UTC
Size:
2.66 KB
patch
obsolete
>From 040dafc7c92580d28133048494dfeba561320e76 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 13 Sep 2016 14:41:51 +0100 >Subject: [PATCH] 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 >--- > 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 232ddd3..aa86bc2 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 @@ > </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> >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index a9963db..45454b0 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -638,9 +638,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}; > >@@ -790,6 +790,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.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16816
:
55532
|
55633
|
55640