]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 286461:Add products table to search if classification are needed
authorbugreport%peshkin.net <>
Tue, 5 Apr 2005 06:02:16 +0000 (06:02 +0000)
committerbugreport%peshkin.net <>
Tue, 5 Apr 2005 06:02:16 +0000 (06:02 +0000)
Patch by joel
r=gerv, a=justdave

Bugzilla/Search.pm
report.cgi

index 1f8e53ea34936616a4315d0f92c554052d8586b3..0283b7f763471c06389d01220ca0a36dd9746b49 100644 (file)
@@ -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",
index a2beeebf1e8e262a7e8face9a6a996f381b907ac..30c7cade8731519d20d03da5442e40ea650c4df7 100755 (executable)
@@ -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);