From: Frédéric Buclin Date: Sat, 27 Aug 2011 09:29:18 +0000 (+0200) Subject: Bug 622487: Product and component mismatch: a product without any component gets... X-Git-Tag: bugzilla-4.2rc1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cfecf559d27fe2a29cd3e8d246e069fd30601a9;p=thirdparty%2Fbugzilla.git Bug 622487: Product and component mismatch: a product without any component gets components of another product in the Advanced Search page r=mkanat a=LpSolit --- diff --git a/query.cgi b/query.cgi index 93de62b63d..43649cc587 100755 --- 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});