diff --git a/mozilla/webtools/bugzilla/Bugzilla/Search.pm b/mozilla/webtools/bugzilla/Bugzilla/Search.pm index 261e1ae0af5..bf81451aec8 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Search.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Search.pm @@ -1049,6 +1049,7 @@ sub init { $chart < 0 || $params->param("field$chart-0-0") ; $chart++) { $chartid = $chart >= 0 ? $chart : ""; + my @chartandlist = (); for ($row = 0 ; $params->param("field$chart-$row-0") ; $row++) { @@ -1111,7 +1112,14 @@ sub init { } if (@orlist) { @orlist = map("($_)", @orlist) if (scalar(@orlist) > 1); - push(@andlist, "(" . join(" OR ", @orlist) . ")"); + push(@chartandlist, "(" . join(" OR ", @orlist) . ")"); + } + } + if (@chartandlist) { + if ($params->param("negate$chart")) { + push(@andlist, "NOT(" . join(" AND ", @chartandlist) . ")"); + } else { + push(@andlist, "(" . join(" AND ", @chartandlist) . ")"); } } } diff --git a/mozilla/webtools/bugzilla/query.cgi b/mozilla/webtools/bugzilla/query.cgi index bd60e5b6703..e3c261d5989 100755 --- a/mozilla/webtools/bugzilla/query.cgi +++ b/mozilla/webtools/bugzilla/query.cgi @@ -357,7 +357,7 @@ for (my $chart = 0; $::FORM{"field$chart-0-0"}; $chart++) { } push(@rows, \@cols); } - push(@charts, \@rows); + push(@charts, {'rows' => \@rows, 'negate' => $::FORM{"negate$chart"}}); } $default{'charts'} = \@charts; diff --git a/mozilla/webtools/bugzilla/template/en/default/search/boolean-charts.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/search/boolean-charts.html.tmpl index ba88b67b4c2..6887321f4e4 100644 --- a/mozilla/webtools/bugzilla/template/en/default/search/boolean-charts.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/search/boolean-charts.html.tmpl @@ -57,7 +57,16 @@ [% FOREACH chart = default.charts %] [% chartnum = loop.count - 1 %]