From 816eb1e9bd788b2b3468481281793639c824996d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 25 Feb 2008 22:06:24 +0000 Subject: Bug 415652: Implement Bugzilla->active_custom_fields - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- post_bug.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index fbfdf27f7..957e7b75f 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -124,8 +124,8 @@ $template->process($format->{'template'}, $vars, \$comment) || ThrowTemplateError($template->error()); # Include custom fields editable on bug creation. -my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT} - Bugzilla->get_fields({ custom => 1, obsolete => 0, enter_bug => 1 }); +my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT && $_->enter_bug} + Bugzilla->active_custom_fields; # Undefined custom fields are ignored to ensure they will get their default # value (e.g. "---" for custom single select fields). @@ -167,9 +167,9 @@ $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 }); +my @multi_selects = grep {$_->type == FIELD_TYPE_MULTI_SELECT && $_->enter_bug} + Bugzilla->active_custom_fields; + foreach my $field (@multi_selects) { $bug_params{$field->name} = [$cgi->param($field->name)]; } -- cgit v1.2.3-24-g4f1b