From: bugreport%peshkin.net <> Date: Mon, 10 Oct 2005 10:19:27 +0000 (+0000) Subject: Bug 311489 Bug entry makes user choose classification even if only one is enterable X-Git-Tag: bugzilla-2.20.1~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af77343b54dca5a7fcffe07c91e4508976e88b28;p=thirdparty%2Fbugzilla.git Bug 311489 Bug entry makes user choose classification even if only one is enterable Patch by Joel Peshkin r=wicked, a=justdave --- diff --git a/enter_bug.cgi b/enter_bug.cgi index 00f790de5d..ecded81dfc 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -84,8 +84,17 @@ if (!defined $product || $product eq "") { my %classifications; foreach my $c (GetSelectableClassifications()) { - $classdesc{$c} = $::classdesc{$c}; - $classifications{$c} = $::classifications{$c}; + my $found = 0; + foreach my $p (@enterable_products) { + if (CanEnterProduct($p) + && IsInClassification($c,$p)) { + $found = 1; + } + } + if ($found) { + $classdesc{$c} = $::classdesc{$c}; + $classifications{$c} = $::classifications{$c}; + } } my $classification_size = scalar(keys %classdesc);