]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1083258 - The size check for input <select>s on show_bug.cgi doesn't take into...
authorDylan William Hardison <dylan@hardison.net>
Thu, 23 Oct 2014 16:31:25 +0000 (12:31 -0400)
committerDylan William Hardison <dylan@hardison.net>
Thu, 23 Oct 2014 16:31:25 +0000 (12:31 -0400)
r=dkl a=glob

Bugzilla/Bug.pm
template/en/default/bug/edit.html.tmpl

index aa5085fe702da42897fd8571e928a9430301a244..aec7c1e82d00e921f7b59e7683427bdaefb4fc95 100644 (file)
@@ -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'};
 }
index ca0e771e06ba8b7d58d6c579354ca41c00cf30c3..a7674faf856f7c502c4e1ee4b8e6f78961dceaa5 100644 (file)
       <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 %]