aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-17 09:56:37 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-17 09:56:37 -0700
commitacdcae1b0c2f6e355390f7e7ddf768c79402c313 (patch)
tree389c8a452e34fc3e3dff6458e8674945ab2f52be /Bugzilla
parente49e5f215fe95a27bc1c779746ff5724af5b1c2a (diff)
downloadbugs-acdcae1b0c2f6e355390f7e7ddf768c79402c313.tar
bugs-acdcae1b0c2f6e355390f7e7ddf768c79402c313.tar.gz
bugs-acdcae1b0c2f6e355390f7e7ddf768c79402c313.tar.bz2
bugs-acdcae1b0c2f6e355390f7e7ddf768c79402c313.tar.xz
bugs-acdcae1b0c2f6e355390f7e7ddf768c79402c313.zip
Bug 556373: Move the adding/removing of groups from process_bug.cgi to
Bugzilla::Bug::set_all r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 26e71c4f8..6f2c2b602 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1854,6 +1854,15 @@ sub set_all {
my $self = shift;
my ($params) = @_;
+ # strict_isolation checks mean that we should set the groups
+ # immediately after changing the product.
+ foreach my $group (@{ $params->{groups}->{add} || [] }) {
+ $self->add_group($group);
+ }
+ foreach my $group (@{ $params->{groups}->{remove} || [] }) {
+ $self->remove_group($group);
+ }
+
if (exists $params->{'dependson'} or exists $params->{'blocked'}) {
my %set_deps;
foreach my $name (qw(dependson blocked)) {
@@ -2400,7 +2409,8 @@ sub add_group {
# to this group by the current user.
$self->product_obj->group_is_settable($group)
|| ThrowUserError('group_invalid_restriction',
- { product => $self->product, group_id => $group->id });
+ { product => $self->product, group_id => $group->id,
+ bug => $self });
# OtherControl people can add groups only during a product change,
# and only when the group is not NA for them.