]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1005780 - When cloning a bug, also add the assignee and qa contact to the CC...
authorSimon Green <sgreen@redhat.com>
Tue, 6 May 2014 23:07:49 +0000 (09:07 +1000)
committerSimon Green <sgreen@redhat.com>
Tue, 6 May 2014 23:07:49 +0000 (09:07 +1000)
r=glob, a=glob

enter_bug.cgi

index 93997e665d02b0bdbfe8c39cd44c31dc0be6f5b7..baf5d78339d4ffb6f0bede37b445dfd9f0a87e42 100755 (executable)
@@ -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) {