]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 622487: Product and component mismatch: a product without any component gets...
authorFrédéric Buclin <LpSolit@gmail.com>
Sat, 27 Aug 2011 09:29:18 +0000 (11:29 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 27 Aug 2011 09:29:18 +0000 (11:29 +0200)
r=mkanat a=LpSolit

query.cgi

index 93de62b63d27fcf39ccaa41c403c02873630287a..43649cc5872c41067d8de924adbefeab55a63951 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -139,6 +139,9 @@ my %components;
 my %versions;
 my %milestones;
 
+# Exclude products with no components.
+@selectable_products = grep { scalar @{$_->components} } @selectable_products;
+
 foreach my $product (@selectable_products) {
     $components{$_->name} = 1 foreach (@{$product->components});
     $versions{$_->name}   = 1 foreach (@{$product->versions});