summaryrefslogtreecommitdiffstats
path: root/report.cgi
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-11-18 08:56:25 +0100
committergerv%gerv.net <>2002-11-18 08:56:25 +0100
commit3e4c503273cd8c1ab6e9dce41ce507ca2caa1885 (patch)
treefe452467bdc7302712fcdd17b6d3fedb00a91297 /report.cgi
parente68c953f721afdee14a4fb7b447574e12c69abf2 (diff)
downloadbugzilla-3e4c503273cd8c1ab6e9dce41ce507ca2caa1885.tar.gz
bugzilla-3e4c503273cd8c1ab6e9dce41ce507ca2caa1885.tar.xz
Bug 180205 - General reporting fixes. Fixes bug 180151 (Grand total links are messed up when axis is restricted), bug 180105 (CSV reports occasionally break), bug 179671 (Boolean charts are broken on reporting pages), bug 179887 (report.cgi should |require Data::Dumper|, not |use|), and works around bug 179581 (Keyword combinations report not very useful). Patch by gerv; r=bbaetz, a=justdave.
Diffstat (limited to 'report.cgi')
-rwxr-xr-xreport.cgi24
1 files changed, 20 insertions, 4 deletions
diff --git a/report.cgi b/report.cgi
index 5680ec466..c532d523d 100755
--- a/report.cgi
+++ b/report.cgi
@@ -28,6 +28,14 @@ require "CGI.pl";
use vars qw($cgi $template $vars);
+# Go straight back to query.cgi if we are adding a boolean chart.
+if (grep(/^cmd-/, $cgi->param())) {
+ my $params = $cgi->canonicalise_query("format", "ctype");
+ print "Location: query.cgi?format=" . $cgi->param('query_format') .
+ ($params ? "&$params" : "") . "\n\n";
+ exit;
+}
+
use Bugzilla::Search;
ConnectToDatabase();
@@ -216,10 +224,18 @@ if ($action eq "wrap") {
$vars->{'format'} = $formatparam;
$formatparam = '';
+ # We need to keep track of the defined restrictions on each of the
+ # axes, because buglistbase, below, throws them away. Without this, we
+ # get buglistlinks wrong if there is a restriction on an axis field.
+ $vars->{'col_vals'} = join("&", $::buffer =~ /[&?]($col_field=[^&]+)/g);
+ $vars->{'row_vals'} = join("&", $::buffer =~ /[&?]($row_field=[^&]+)/g);
+ $vars->{'tbl_vals'} = join("&", $::buffer =~ /[&?]($tbl_field=[^&]+)/g);
+
# We need a number of different variants of the base URL for different
# URLs in the HTML.
$vars->{'buglistbase'} = $cgi->canonicalise_query(
- "x_axis_field", "y_axis_field", "z_axis_field", "format", @axis_fields);
+ "x_axis_field", "y_axis_field", "z_axis_field",
+ "ctype", "format", @axis_fields);
$vars->{'imagebase'} = $cgi->canonicalise_query(
$tbl_field, "action", "ctype", "format", "width", "height");
$vars->{'switchbase'} = $cgi->canonicalise_query(
@@ -249,11 +265,11 @@ print "Content-Type: $format->{'ctype'}\n\n";
# Problems with this CGI are often due to malformed data. Setting debug=1
# prints out both data structures.
if ($::FORM{'debug'}) {
- use Data::Dumper;
+ require Data::Dumper;
print "<pre>data hash:\n";
- print Dumper(%data) . "\n\n";
+ print Data::Dumper::Dumper(%data) . "\n\n";
print "data array:\n";
- print Dumper(@image_data) . "\n\n</pre>";
+ print Data::Dumper::Dumper(@image_data) . "\n\n</pre>";
}
$template->process("$format->{'template'}", $vars)