From: mkanat%bugzilla.org <> Date: Wed, 18 Nov 2009 06:31:59 +0000 (+0000) Subject: Bug 526189: Silently ignore any attempts to add an inactive group to a bug, which... X-Git-Tag: bugzilla-3.4.4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1c6214630255f6981bc46716946296d61b8302a;p=thirdparty%2Fbugzilla.git 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 --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 8dfe9fbf8d..11471267d2 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2297,6 +2297,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})