diff options
author | olav%bkor.dhs.org <> | 2006-10-21 08:31:31 +0200 |
---|---|---|
committer | olav%bkor.dhs.org <> | 2006-10-21 08:31:31 +0200 |
commit | 08525a87465db4ec1e0201ac206df25c59cf929e (patch) | |
tree | 38507f60174e0d7198434722d242135bf1c10846 /post_bug.cgi | |
parent | a39a4ef297b2435cbd4a4ef50d459b68c8bb6106 (diff) | |
download | bugzilla-08525a87465db4ec1e0201ac206df25c59cf929e.tar.gz bugzilla-08525a87465db4ec1e0201ac206df25c59cf929e.tar.xz |
Bug 352695: Custom select fields are mandatory on bug creation (despite they shouldn't be)
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=myk
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 59c079897..715437141 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -123,7 +123,10 @@ $template->process($format->{'template'}, $vars, \$comment) my @custom_bug_fields = Bugzilla->get_fields( { custom => 1, obsolete => 0, enter_bug => 1 }); -my @bug_fields = map { $_->name } @custom_bug_fields; +# Undefined custom fields are ignored to ensure they will get their default +# value (e.g. "---" for custom single select fields). +my @bug_fields = grep { defined $cgi->param($_->name) } @custom_bug_fields; +@bug_fields = map { $_->name } @bug_fields; # Custom tables must be locked (required when validating custom fields). my @custom_tables = grep { $_->type == FIELD_TYPE_SINGLE_SELECT } @custom_bug_fields; |