diff options
author | mkanat%bugzilla.org <> | 2006-09-21 06:57:57 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-09-21 06:57:57 +0200 |
commit | c6433b10999a9bfe1f26bea4deaba11db3251fc0 (patch) | |
tree | 49a274adb031a18a9b3bd7f2641cc9d92a9f5449 /Bugzilla/Bug.pm | |
parent | f90a0b775e927aad00631ce80d282186a3022af5 (diff) | |
download | bugzilla-c6433b10999a9bfe1f26bea4deaba11db3251fc0.tar.gz bugzilla-c6433b10999a9bfe1f26bea4deaba11db3251fc0.tar.xz |
Bug 38922: Default (Initial) CC list for each component
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla/Bug.pm')
-rwxr-xr-x | Bugzilla/Bug.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index d309d0bc2..5ac2f2b0b 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -115,7 +115,6 @@ sub VALIDATORS { alias => \&_check_alias, bug_file_loc => \&_check_bug_file_loc, bug_severity => \&_check_bug_severity, - cc => \&_check_cc, comment => \&_check_comment, commentprivacy => \&_check_commentprivacy, deadline => \&_check_deadline, @@ -353,6 +352,8 @@ sub run_create_validators { $class->_check_assigned_to($component, $params->{assigned_to}); $params->{qa_contact} = $class->_check_qa_contact($component, $params->{qa_contact}); + $params->{cc} = $class->_check_cc($component, $params->{cc}); + # Callers cannot set Reporter, currently. $params->{reporter} = Bugzilla->user->id; @@ -506,7 +507,7 @@ sub _check_bug_status { } sub _check_cc { - my ($invocant, $ccs) = @_; + my ($invocant, $component, $ccs) = @_; return [] unless $ccs; my %cc_ids; @@ -515,6 +516,10 @@ sub _check_cc { my $id = login_to_id($person, THROW_ERROR); $cc_ids{$id} = 1; } + + # Enforce Default CC + $cc_ids{$_->id} = 1 foreach (@{$component->initial_cc}); + return [keys %cc_ids]; } |