From: Max Kanat-Alexander Date: Tue, 16 Aug 2011 00:53:05 +0000 (-0700) Subject: Bug 460074: Make post_bug.cgi use should_set for the group field, so it X-Git-Tag: bugzilla-4.0.3~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73c040ca846bee12b66b905bbf5bbdd1002e6a73;p=thirdparty%2Fbugzilla.git Bug 460074: Make post_bug.cgi use should_set for the group field, so it are undef in Bugzilla::Bug->create if not passed to post_bug. This fixes a bug with the guided bug form creating bugs without any groups. r=LpSolit, a=mkanat --- diff --git a/post_bug.cgi b/post_bug.cgi index 8486ba032f..7a070a7563 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -153,8 +153,8 @@ my %bug_params; foreach my $field (@bug_fields) { $bug_params{$field} = $cgi->param($field); } +$bug_params{'groups'} = [$cgi->param('groups')] if $cgi->should_set('groups'); $bug_params{'cc'} = [$cgi->param('cc')]; -$bug_params{'groups'} = [$cgi->param('groups')]; $bug_params{'comment'} = $comment; my @multi_selects = grep {$_->type == FIELD_TYPE_MULTI_SELECT && $_->enter_bug} diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 8e01e92751..c18e1c5354 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -661,6 +661,7 @@ TUI_hide_default('expert_fields');
+ [% FOREACH group = product.groups_available %]