Skip to content

Commit 424bbc8

Browse files
committed
Bug 1083258 - The size check for input <select>s on show_bug.cgi doesn't take into account is_active
r=dkl a=glob
1 parent e50bddb commit 424bbc8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Bugzilla/Bug.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3951,6 +3951,11 @@ sub choices {
39513951
my @resolutions = grep($_->name, @{ $resolution_field->legal_values });
39523952
$choices{'resolution'} = \@resolutions;
39533953

3954+
foreach my $key (keys %choices) {
3955+
my $value = $self->$key;
3956+
$choices{$key} = [grep { $_->is_active || $_->name eq $value } @{ $choices{$key} }];
3957+
}
3958+
39543959
$self->{'choices'} = \%choices;
39553960
return $self->{'choices'};
39563961
}

template/en/default/bug/edit.html.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,6 @@
11941194
<input type="hidden" id="[% selname %]_dirty">
11951195
<select id="[% selname %]" name="[% selname %]">
11961196
[% FOREACH x = bug.choices.${selname} %]
1197-
[% NEXT IF NOT x.is_active AND x.name != bug.${selname} %]
11981197
<option value="[% x.name FILTER html %]"
11991198
[% " selected" IF x.name == bug.${selname} %]>
12001199
[%- x.name FILTER html %]

0 commit comments

Comments
 (0)