summaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-08-27 11:29:18 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-08-27 11:29:18 +0200
commit9cfecf559d27fe2a29cd3e8d246e069fd30601a9 (patch)
treedf391e68e40088a0f0aa8af32778f704a7a462f0 /query.cgi
parent38e72e581678c0420b911d2a1fb134a8d5dc0309 (diff)
downloadbugzilla-9cfecf559d27fe2a29cd3e8d246e069fd30601a9.tar.gz
bugzilla-9cfecf559d27fe2a29cd3e8d246e069fd30601a9.tar.xz
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
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/query.cgi b/query.cgi
index 93de62b63..43649cc58 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});