aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-17 14:06:09 -0800
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-17 14:06:09 -0800
commit5734a05f7e7c9d171c159173ec30a20ffaa33db4 (patch)
tree785247c61d9b0976e304c9631bfd70294aebcb6d
parentBug 537887 - "The flag setter should be able to unset a flag even if not in t... (diff)
downloadbugzilla-5734a05f7e7c9d171c159173ec30a20ffaa33db4.tar.gz
bugzilla-5734a05f7e7c9d171c159173ec30a20ffaa33db4.tar.bz2
bugzilla-5734a05f7e7c9d171c159173ec30a20ffaa33db4.zip
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