From: bugreport%peshkin.net <> Date: Tue, 5 Apr 2005 06:02:16 +0000 (+0000) Subject: Bug 286461:Add products table to search if classification are needed X-Git-Tag: bugzilla-2.19.3~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af00161996a15e545573c29ccac52185eeb9b9dd;p=thirdparty%2Fbugzilla.git Bug 286461:Add products table to search if classification are needed Patch by joel r=gerv, a=justdave --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 1f8e53ea34..0283b7f763 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -139,6 +139,8 @@ sub init { push @supptables, "INNER JOIN classifications AS map_classifications " . "ON map_products.classification_id = map_classifications.id"; + push @supptables, "INNER JOIN products AS map_products " . + "ON bugs.product_id = map_products.id"; } if (lsearch($fieldsref, 'map_components.name') >= 0) { @@ -863,6 +865,8 @@ sub init { "^classification,(?!changed)" => sub { # Generate the restriction condition + push @supptables, "INNER JOIN products AS map_products " . + "ON bugs.product_id = map_products.id"; $f = $ff = "classifications.name"; $funcsbykey{",$t"}->(); $term = build_subselect("map_products.classification_id", diff --git a/report.cgi b/report.cgi index a2beeebf1e..30c7cade87 100755 --- a/report.cgi +++ b/report.cgi @@ -136,12 +136,6 @@ $columns{''} = "42217354"; my @axis_fields = ($row_field, $col_field, $tbl_field); my @selectnames = map($columns{$_}, @axis_fields); -# add product if person is requesting classification -if (lsearch(\@axis_fields,"classification") >= 0) { - if (lsearch(\@axis_fields,"product") < 0) { - push(@selectnames,($columns{'product'})); - } -} # Clone the params, so that Bugzilla::Search can modify them my $params = new Bugzilla::CGI($cgi);