]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 460074: Make post_bug.cgi use should_set for the group field, so it
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 16 Aug 2011 00:53:05 +0000 (17:53 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 16 Aug 2011 00:53:05 +0000 (17:53 -0700)
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

post_bug.cgi
template/en/default/bug/create/create.html.tmpl

index 8486ba032f67e3bb7040e739a6e17319c4fd31a8..7a070a756382dda1d6827eccdb23cef9a409885f 100755 (executable)
@@ -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}
index 8e01e927510754839df22ca90050817909334b39..c18e1c53546387b73b504ba8ec76f68ffa4e581b 100644 (file)
@@ -661,6 +661,7 @@ TUI_hide_default('expert_fields');
       <br>
 
       <!-- Checkboxes -->
+      <input type="hidden" name="defined_groups" value="1">
       [% FOREACH group = product.groups_available %]
         <input type="checkbox" id="group_[% group.id FILTER html %]"
                name="groups" value="[% group.name FILTER html %]"