aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2012-07-23 09:05:05 -0700
committerReed Loden <reed@reedloden.com>2012-07-23 09:05:05 -0700
commit58cfa7b96dd3e480140b258b9dd88b65b772b0a2 (patch)
treee5e69cfcf5ab3f88739504c4cc8a6b2864c287ad
parentBug 773948: duplicates.cgi must include Bugzilla::Bug (diff)
downloadbugzilla-58cfa7b96dd3e480140b258b9dd88b65b772b0a2.tar.gz
bugzilla-58cfa7b96dd3e480140b258b9dd88b65b772b0a2.tar.bz2
bugzilla-58cfa7b96dd3e480140b258b9dd88b65b772b0a2.zip
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]
-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'});
}