From: Frédéric Buclin Date: Fri, 11 Oct 2013 21:42:22 +0000 (+0200) Subject: Fixes on checkin for bug 769134 X-Git-Tag: bugzilla-4.5.1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c88c3c0a5582284e5f72252b4742eebb5a1c895a;p=thirdparty%2Fbugzilla.git Fixes on checkin for bug 769134 --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3000bd0aec..2c0d458e73 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2541,6 +2541,7 @@ sub _set_product { my @idlist = ($self->id); push(@idlist, map {$_->id} @{ $params->{other_bugs} }) if $params->{other_bugs}; + @idlist = uniq @idlist; # Get the ID of groups which are no longer valid in the new product. my $gids = $dbh->selectcol_arrayref( 'SELECT bgm.group_id @@ -2555,13 +2556,13 @@ sub _set_product { . Bugzilla->user->groups_as_string . ')) OR gcm.othercontrol != ?) )', undef, (@idlist, $product->id, CONTROLMAPNA, CONTROLMAPNA)); - $vars{'old_groups'} = Bugzilla::Group->new_from_list($gids); + $vars{'old_groups'} = Bugzilla::Group->new_from_list($gids); # Did we come here from editing multiple bugs? (affects how we # show optional group changes) - $vars{multiple_bugs} = Bugzilla->cgi->param('id') ? 0 : 1; + $vars{multiple_bugs} = (@idlist > 1) ? 1 : 0; } - + if (%vars) { $vars{product} = $product; $vars{bug} = $self; diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl index c712ae09ae..a1a9539f22 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -141,7 +141,6 @@

These groups are optional. You can decide to restrict [% terms.bugs %] to one or more of the following groups:
[% IF multiple_bugs %] - [% USE Bugzilla %]