summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-09-08 07:14:25 +0200
committermkanat%bugzilla.org <>2007-09-08 07:14:25 +0200
commitaa888f2218179d59b4f0b8e51e43b863f1da3e43 (patch)
tree4e6bf6ff4b7066b19c5b1728dd325adf4bed1f78 /post_bug.cgi
parent16336299f17522d040736cb0f063694381d9d761 (diff)
downloadbugzilla-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.gz
bugzilla-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.xz
Bug 287330: Multi-Select Custom Fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi11
1 files changed, 9 insertions, 2 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index b873d8f72..ddc12fd64 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -120,8 +120,8 @@ $template->process($format->{'template'}, $vars, \$comment)
|| ThrowTemplateError($template->error());
# Include custom fields editable on bug creation.
-my @custom_bug_fields = Bugzilla->get_fields(
- { custom => 1, obsolete => 0, enter_bug => 1 });
+my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT}
+ Bugzilla->get_fields({ custom => 1, obsolete => 0, enter_bug => 1 });
# Undefined custom fields are ignored to ensure they will get their default
# value (e.g. "---" for custom single select fields).
@@ -167,6 +167,13 @@ $bug_params{'cc'} = [$cgi->param('cc')];
$bug_params{'groups'} = \@selected_groups;
$bug_params{'comment'} = $comment;
+my @multi_selects = Bugzilla->get_fields(
+ { type => FIELD_TYPE_MULTI_SELECT, custom => 1, obsolete => 0,
+ enter_bug => 1 });
+foreach my $field (@multi_selects) {
+ $bug_params{$field->name} = [$cgi->param($field->name)];
+}
+
my $bug = Bugzilla::Bug->create(\%bug_params);
# Get the bug ID back.