]> 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:33:53 +0000 (11:33 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 27 Aug 2011 09:33:53 +0000 (11:33 +0200)
r=mkanat a=LpSolit

query.cgi

index 6c14565122cc6305301ae1f794a829878c9b587d..e10a698a3bc22e8ebeecdfedd083d0bbc1cec265 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -168,6 +168,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});