diff options
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3000bd0ae..2c0d458e7 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; |