From: Simon Green Date: Tue, 6 May 2014 23:07:49 +0000 (+1000) Subject: Bug 1005780 - When cloning a bug, also add the assignee and qa contact to the CC... X-Git-Tag: bugzilla-4.5.5~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85e0d6c95959b6086f5f5a90c6d3d50f294c043f;p=thirdparty%2Fbugzilla.git Bug 1005780 - When cloning a bug, also add the assignee and qa contact to the CC: list of the new bug r=glob, a=glob --- diff --git a/enter_bug.cgi b/enter_bug.cgi index 93997e665d..baf5d78339 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -216,10 +216,14 @@ if ($cloned_bug_id) { } else { $vars->{'cc'} = formvalue('cc'); } - - if ($cloned_bug->reporter->id != $user->id - && none { $_ eq $cloned_bug->reporter->login } @{$cloned_bug->cc}) { - $vars->{'cc'} = join (", ", $cloned_bug->reporter->login, $vars->{'cc'}); + + foreach my $role (qw(reporter assigned_to qa_contact)) { + if (defined($cloned_bug->$role) + && $cloned_bug->$role->id != $user->id + && none { $_ eq $cloned_bug->$role->login } @{$cloned_bug->cc}) + { + $vars->{'cc'} = join (", ", $cloned_bug->$role->login, $vars->{'cc'}); + } } foreach my $field (@enter_bug_fields) {