Bug 940010 - When entering a new bug, if there's only one active version or component, automatically select it
r=LpSolit, a=sgreen git-svn-id: svn://10.0.0.236/trunk@265159 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
531e7154f1
commit
14ded6f71d
@ -1 +1 @@
|
|||||||
8843
|
8844
|
||||||
@ -149,9 +149,16 @@ if ($cloned_bug_id) {
|
|||||||
$cloned_bug_id = $cloned_bug->id;
|
$cloned_bug_id = $cloned_bug->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scalar(@{$product->components}) == 1) {
|
# If there is only one active component, choose it
|
||||||
# Only one component; just pick it.
|
my @active = grep { $_->is_active } @{$product->components};
|
||||||
$cgi->param('component', $product->components->[0]->name);
|
if (scalar(@active) == 1) {
|
||||||
|
$cgi->param('component', $active[0]->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
# If there is only one active version, choose it
|
||||||
|
@active = grep { $_->is_active } @{$product->versions};
|
||||||
|
if (scalar(@active) == 1) {
|
||||||
|
$cgi->param('version', $active[0]->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
my %default;
|
my %default;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user