diff options
author | Dylan William Hardison <dylan@hardison.net> | 2014-10-23 12:31:25 -0400 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2014-10-23 12:31:55 -0400 |
commit | d4146c594381f3303bb06b02dbe94be69c1da538 (patch) | |
tree | b87890b9b3cfd4d9ce281b7eee52b5a387589c66 | |
parent | e50bddb296ca6ef5c7afb70da3de1aa2c55e7e77 (diff) | |
download | bugs-d4146c594381f3303bb06b02dbe94be69c1da538.tar bugs-d4146c594381f3303bb06b02dbe94be69c1da538.tar.gz bugs-d4146c594381f3303bb06b02dbe94be69c1da538.tar.bz2 bugs-d4146c594381f3303bb06b02dbe94be69c1da538.tar.xz bugs-d4146c594381f3303bb06b02dbe94be69c1da538.zip |
Bug 1083258 - The size check for input <select>s on show_bug.cgi doesn't take into account is_active
r=dkl a=glob
-rw-r--r-- | Bugzilla/Bug.pm | 5 | ||||
-rw-r--r-- | template/en/default/bug/edit.html.tmpl | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index aa5085fe7..aec7c1e82 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3951,6 +3951,11 @@ sub choices { my @resolutions = grep($_->name, @{ $resolution_field->legal_values }); $choices{'resolution'} = \@resolutions; + foreach my $key (keys %choices) { + my $value = $self->$key; + $choices{$key} = [grep { $_->is_active || $_->name eq $value } @{ $choices{$key} }]; + } + $self->{'choices'} = \%choices; return $self->{'choices'}; } diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index ca0e771e0..a7674faf8 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -1194,7 +1194,6 @@ <input type="hidden" id="[% selname %]_dirty"> <select id="[% selname %]" name="[% selname %]"> [% FOREACH x = bug.choices.${selname} %] - [% NEXT IF NOT x.is_active AND x.name != bug.${selname} %] <option value="[% x.name FILTER html %]" [% " selected" IF x.name == bug.${selname} %]> [%- x.name FILTER html %] |