From 4ecad695963ba8f72a3568afa5cc419bf6e4ebbd Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 18 Nov 2009 06:30:57 +0000 Subject: Bug 526189: Silently ignore any attempts to add an inactive group to a bug, which fixes the fact that mandatory groups were being added to bugs when changing products, even if they were inactive (not used for bugs). Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/Bug.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 107b3f6af..9af8b1e8c 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2285,6 +2285,8 @@ sub add_group { $group = new Bugzilla::Group($group) unless ref $group; return unless $group; + return if !$group->is_active or !$group->is_bug_group; + # Make sure that bugs in this product can actually be restricted # to this group. grep($group->id == $_->id, @{$self->product_obj->groups_valid}) -- cgit v1.2.3-24-g4f1b