summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-10-29 22:33:21 +0100
committerDylan William Hardison <dylan@hardison.net>2014-10-29 22:33:21 +0100
commitae69ad5447de722c68c7a85bc0d35645b5f1cccd (patch)
treed073016dcf21219f7d2dbbd0f4f81ad5a6064a8f
parent37bd66c10e4ce1fe0015519d95841d21eb917c34 (diff)
downloadbugzilla-ae69ad5447de722c68c7a85bc0d35645b5f1cccd.tar.gz
bugzilla-ae69ad5447de722c68c7a85bc0d35645b5f1cccd.tar.xz
Bug 1090175 - Backport upstream bug 1083258 (fix single value select elements)
r=dkl
-rw-r--r--Bugzilla/Bug.pm5
-rw-r--r--template/en/default/bug/edit.html.tmpl1
2 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 90a9f96bb..7d47e9bb5 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -3895,6 +3895,11 @@ sub choices {
my @resolutions = grep($_->name, @{ $resolution_field->legal_values });
$choices{'resolution'} = \@resolutions;
+ foreach my $key (keys %choices) {
+ my $name = $self->$key;
+ $choices{$key} = [grep { $_->is_active || $_->name eq $name } @{ $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 9b039693a..4ccf2a0a2 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -1250,7 +1250,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 %]