Commit 41f2789c authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

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
parent d758e50a
......@@ -395,7 +395,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment