summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-11-18 07:30:57 +0100
committermkanat%bugzilla.org <>2009-11-18 07:30:57 +0100
commit4ecad695963ba8f72a3568afa5cc419bf6e4ebbd (patch)
tree6f611933bda16b873ef01bb3e7b01923b63db0e6
parent4980d09370db1a86eb47eb21cc3b562fc6204319 (diff)
downloadbugzilla-4ecad695963ba8f72a3568afa5cc419bf6e4ebbd.tar.gz
bugzilla-4ecad695963ba8f72a3568afa5cc419bf6e4ebbd.tar.xz
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 <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
-rw-r--r--Bugzilla/Bug.pm2
1 files changed, 2 insertions, 0 deletions
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})