summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2012-07-23 18:05:05 +0200
committerReed Loden <reed@reedloden.com>2012-07-23 18:05:05 +0200
commit58cfa7b96dd3e480140b258b9dd88b65b772b0a2 (patch)
treee5e69cfcf5ab3f88739504c4cc8a6b2864c287ad /enter_bug.cgi
parent19f3bf5073fb064ddc014984ae8382eaa8a02705 (diff)
downloadbugzilla-58cfa7b96dd3e480140b258b9dd88b65b772b0a2.tar.gz
bugzilla-58cfa7b96dd3e480140b258b9dd88b65b772b0a2.tar.xz
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]
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index d082bf6a7..b571f8f44 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'});
}