From: Reed Loden Date: Mon, 23 Jul 2012 16:05:05 +0000 (-0700) Subject: Bug 715432 - Cloned bugs will include duplicates in the CC list if the reporter is... X-Git-Tag: bugzilla-4.3.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58cfa7b96dd3e480140b258b9dd88b65b772b0a2;p=thirdparty%2Fbugzilla.git Bug 715432 - Cloned bugs will include duplicates in the CC list if the reporter is also CC'd to the bug [r=glob a=LpSolit] --- diff --git a/enter_bug.cgi b/enter_bug.cgi index d082bf6a7c..b571f8f442 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -35,6 +35,8 @@ use Bugzilla::Field; use Bugzilla::Status; use Bugzilla::UserAgent; +use List::MoreUtils qw(none); + my $user = Bugzilla->login(LOGIN_REQUIRED); my $cloned_bug; @@ -231,7 +233,8 @@ if ($cloned_bug_id) { $vars->{'cc'} = formvalue('cc'); } - if ($cloned_bug->reporter->id != $user->id) { + 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'}); }