Bugzilla – Attachment 74871 Details for
Bug 20663
Dead report code for "Create Compound Report" since prior to 3.0.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20663: Remove dead code related to compound reports
Bug-20663-Remove-dead-code-related-to-compound-rep.patch (text/plain), 4.70 KB, created by
Mark Tompsett
on 2018-04-26 04:34:23 UTC
(
hide
)
Description:
Bug 20663: Remove dead code related to compound reports
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-04-26 04:34:23 UTC
Size:
4.70 KB
patch
obsolete
>From eb060e0ffb9e4dd4784886ea73746ba891a4b87f Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 26 Apr 2018 04:17:51 +0000 >Subject: [PATCH] Bug 20663: Remove dead code related to compound reports > >TEST PLAN >--------- >git grep "Create Compound Report" >-- only one file >git grep compound | grep 1 >-- this is the only setting of the compound tt variable >less koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >-- There is an TT IF statement for compound. >-- In that statement it would trigger 'Save Compound' >git grep save_compound >-- only the template and the guided report perl >git grep create_compound >-- only triggered by the save code in the guided report perl >-- in the export for the C4/Reports/Guided.pm >git grep run_compound >-- left over in export > >apply the patch >look around and see the pieces are cleaned up. > >run koha qa test tools >--- > C4/Reports/Guided.pm | 31 +--------------------- > .../en/modules/reports/guided_reports_start.tt | 25 ----------------- > reports/guided_reports.pl | 16 ----------- > 3 files changed, 1 insertion(+), 71 deletions(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index d61b282..e03dc1f 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -39,7 +39,7 @@ BEGIN { > @ISA = qw(Exporter); > @EXPORT = qw( > get_report_types get_report_areas get_report_groups get_columns build_query get_criteria >- save_report get_saved_reports execute_query get_saved_report create_compound run_compound >+ save_report get_saved_reports execute_query get_saved_report > get_column_type get_distinct_values save_dictionary get_from_dictionary > delete_definition delete_report format_results get_sql > nb_rows update_sql >@@ -718,35 +718,6 @@ sub get_saved_report { > return $dbh->selectrow_hashref($query, undef, $report_arg); > } > >-=head2 create_compound($masterID,$subreportID) >- >-This will take 2 reports and create a compound report using both of them >- >-=cut >- >-sub create_compound { >- my ( $masterID, $subreportID ) = @_; >- my $dbh = C4::Context->dbh(); >- >- # get the reports >- my $master = get_saved_report($masterID); >- my $mastersql = $master->{savedsql}; >- my $mastertype = $master->{type}; >- my $sub = get_saved_report($subreportID); >- my $subsql = $master->{savedsql}; >- my $subtype = $master->{type}; >- >- # now we have to do some checking to see how these two will fit together >- # or if they will >- my ( $mastertables, $subtables ); >- if ( $mastersql =~ / from (.*) where /i ) { >- $mastertables = $1; >- } >- if ( $subsql =~ / from (.*) where /i ) { >- $subtables = $1; >- } >- return ( $mastertables, $subtables ); >-} > > =head2 get_column_type($column) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 5a443aa..86c17e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -794,31 +794,6 @@ $(document).ready(function() { > </form> > [% END %] > >-[% IF ( compound ) %] >-<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post"> >-Master: <select name="master"> >-[% FOREACH savedreport IN savedreports %] >-<option value="[% savedreport.id %]">[% savedreport.report_name %]</option> >-[% END %] >-</select> >- >-Sub report:<select name="subreport"> >-[% FOREACH savedreport IN savedreports %] >-<option value="[% savedreport.id %]">[% savedreport.report_name %]</option> >-[% END %] >-</select> >-<br /> >-<input type="hidden" name="phase" value="Save Compound" /> >-<input type="submit" name="submit" value="Save compound" /> >-</form> >-[% END %] >- >-[% IF ( save_compound ) %] >-[% master %] <br /> >-[% subsql %] >-[% END %] >- >- > [% IF saved_results %] > <h1>Saved report results</h1> > <h2>[% name %]</h2> >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index b5aa1d3..2273f1c 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -974,22 +974,6 @@ elsif ( $phase eq 'Create report from SQL' ) { > ); > } > >-elsif ($phase eq 'Create Compound Report'){ >- $template->param( 'savedreports' => get_saved_reports(), >- 'compound' => 1, >- ); >-} >- >-elsif ($phase eq 'Save Compound'){ >- my $master = $input->param('master'); >- my $subreport = $input->param('subreport'); >- my ($mastertables,$subtables) = create_compound($master,$subreport); >- $template->param( 'save_compound' => 1, >- master=>$mastertables, >- subsql=>$subtables >- ); >-} >- > # pass $sth, get back an array of names for the column headers > sub header_cell_values { > my $sth = shift or return (); >-- >2.1.4
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 20663
:
74871
|
74872
|
74925
|
74926
|
75055
|
75056