From: Max Kanat-Alexander Date: Wed, 17 Feb 2010 22:07:00 +0000 (-0800) Subject: Bug 538211: Make value-controlled and visibility-controlled fields behave X-Git-Tag: bugzilla-3.4.6~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a93a9970f58680eeb3cade55d8f75a28a84cca7;p=thirdparty%2Fbugzilla.git Bug 538211: Make value-controlled and visibility-controlled fields behave correctly on enter_bug.cgi when the user uses a bookmarkable template to pre-fill values in the controller. r=LpSolit, a=LpSolit --- diff --git a/enter_bug.cgi b/enter_bug.cgi index debd9dab88..9ea093c8c2 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -397,7 +397,14 @@ $vars->{'token'} = issue_session_token('createbug:'); my @enter_bug_fields = grep { $_->enter_bug } Bugzilla->active_custom_fields; foreach my $field (@enter_bug_fields) { - $vars->{$field->name} = formvalue($field->name); + my $cf_name = $field->name; + my $cf_value = $cgi->param($cf_name); + if (defined $cf_value) { + if ($field->type == FIELD_TYPE_MULTI_SELECT) { + $cf_value = [$cgi->param($cf_name)]; + } + $default{$cf_name} = $vars->{$cf_name} = $cf_value; + } } # This allows the Field visibility and value controls to work with the