From adfbc673427a2a44371db5284dd0522e7abb4423 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 9 Sep 2014 00:09:35 +0800 Subject: Bug 1051058: Auto-CC Erica Choe into Finance Review and Master Kick-Off Bugs --- extensions/MozProjectReview/Extension.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'extensions/MozProjectReview') diff --git a/extensions/MozProjectReview/Extension.pm b/extensions/MozProjectReview/Extension.pm index 43f357ef3..a465b30f6 100644 --- a/extensions/MozProjectReview/Extension.pm +++ b/extensions/MozProjectReview/Extension.pm @@ -17,7 +17,9 @@ use Bugzilla::Constants; our $VERSION = '0.01'; -our %tracker_cc = ( +# these users will be cc'd to the parent bug when the corresponding child bug +# is created, as well as the child bug. +our %auto_cc = ( 'legal' => ['liz@mozilla.com'], 'sec-review' => ['curtisk@mozilla.com'], 'finance' => ['waoieong@mozilla.com', 'mcristobal@mozilla.com', 'echoe@mozilla.com'], @@ -247,12 +249,15 @@ sub _file_child_bug { Bugzilla->template->process($full_template, $template_vars, \$comment) || ThrowTemplateError(Bugzilla->template->error()); $bug_data->{'comment'} = $comment; + if (exists $auto_cc{$template_suffix}) { + $bug_data->{'cc'} = { add => $auto_cc{$template_suffix} }; + } if ($new_bug = Bugzilla::Bug->create($bug_data)) { my $set_all = { dependson => { add => [ $new_bug->bug_id ] } }; - if (exists $tracker_cc{$template_suffix}) { - $set_all->{'cc'} = { add => $tracker_cc{$template_suffix} }; + if (exists $auto_cc{$template_suffix}) { + $set_all->{'cc'} = { add => $auto_cc{$template_suffix} }; } $parent_bug->set_all($set_all); $parent_bug->update($parent_bug->creation_ts); -- cgit v1.2.3-24-g4f1b