diff options
author | mkanat%bugzilla.org <> | 2007-09-08 05:14:25 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-09-08 05:14:25 +0000 |
commit | aa888f2218179d59b4f0b8e51e43b863f1da3e43 (patch) | |
tree | 4e6bf6ff4b7066b19c5b1728dd325adf4bed1f78 /post_bug.cgi | |
parent | 16336299f17522d040736cb0f063694381d9d761 (diff) | |
download | bugs-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar bugs-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.gz bugs-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.bz2 bugs-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.xz bugs-aa888f2218179d59b4f0b8e51e43b863f1da3e43.zip |
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-x | post_bug.cgi | 11 |
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. |