summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-17 23:03:51 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-17 23:03:51 +0100
commit41f2789c933d7a7c32960c8b976d5d75de7433f2 (patch)
tree1e3c5f19f1071bcee38c6c8024c93959490ce2be
parentd758e50afca7d94da0510c76eccbb81567315a82 (diff)
downloadbugzilla-41f2789c933d7a7c32960c8b976d5d75de7433f2.tar.gz
bugzilla-41f2789c933d7a7c32960c8b976d5d75de7433f2.tar.xz
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
-rwxr-xr-xenter_bug.cgi9
1 files changed, 8 insertions, 1 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 31e106959..a4ed7350e 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -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