From: Frédéric Buclin Date: Sat, 27 Aug 2011 09:33:53 +0000 (+0200) Subject: Bug 622487: Product and component mismatch: a product without any component gets... X-Git-Tag: bugzilla-4.0.3~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0959a499aba48768e34cda57c0c699d762d1210e;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 6c14565122..e10a698a3b 100755 --- 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});