From 2ab29f0f6a8274ac2cd8dffbdef55e44dbfc35e0 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" Date: Sun, 13 Jul 2003 22:25:41 +0000 Subject: [PATCH] Bug 204798 - Total in graph report is incorrect. Patch by kniht@us.ibm.com; r=gerv, a=justdave. git-svn-id: svn://10.0.0.236/trunk@144803 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/report.cgi | 2 +- .../template/en/default/reports/report.html.tmpl | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mozilla/webtools/bugzilla/report.cgi b/mozilla/webtools/bugzilla/report.cgi index de659ab25b8..487859190bd 100755 --- a/mozilla/webtools/bugzilla/report.cgi +++ b/mozilla/webtools/bugzilla/report.cgi @@ -198,7 +198,7 @@ foreach my $tbl (@tbl_names) { push(@tbl_data, \@col_data); } - push(@image_data, \@tbl_data); + unshift(@image_data, \@tbl_data); } $vars->{'col_field'} = $col_field; diff --git a/mozilla/webtools/bugzilla/template/en/default/reports/report.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/reports/report.html.tmpl index 321ad6ae8d4..31308c10c71 100644 --- a/mozilla/webtools/bugzilla/template/en/default/reports/report.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/reports/report.html.tmpl @@ -94,8 +94,16 @@ [% imageurl = BLOCK %]report.cgi?[% imagebase %]&format= [% format FILTER url_quote %]&ctype=png&action=plot& - [% IF tbl_field AND tbl != "-total-" %] - [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]& + [% IF tbl_field %] + [% IF tbl != "-total-" %] + [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]& + [% ELSE %] + [% FOREACH tblname = tbl_names %] + [% IF tblname != "-total-" %] + [% tbl_field FILTER url_quote %]=[% tblname FILTER url_quote %]& + [% END %] + [% END %] + [% END %] [% END %]width=[% width %]&height=[% height %] [% END %]