Fix for bug 71912: changes email pref for "If I'm removed from that capacity" to…

Fix for bug 71912: changes email pref for "If I'm removed from that capacity" to "If I'm added to or removed from that capacity", so you can still get mail when someone adds you to a CC. Patch by <jake@acutex.net> r= justdave
parent d8a6bd52
...@@ -679,6 +679,21 @@ sub getEmailAttributes ($@) { ...@@ -679,6 +679,21 @@ sub getEmailAttributes ($@) {
} elsif ( $fieldName eq 'CC') { } elsif ( $fieldName eq 'CC') {
push (@flags, 'CC'); push (@flags, 'CC');
} }
# These next few lines are for finding out who's been added
# to the Owner, QA, CC, etc. fields. It does not effect
# the @flags array at all, but is run here because it does
# effect filtering later and we're already in the loop.
if ($fieldName eq 'Owner') {
push (@{$force{'Owner'}}, $new);
} elsif ($fieldName eq 'QAContact') {
push (@{$force{'QAContact'}}, $new);
} elsif ($fieldName eq 'CC') {
my @oldVal = split (/,/, $old);
my @newVal = split (/,/, $new);
my @added = filterExcludeList(\@newVal, \@oldVal);
push (@{$force{'CClist'}}, @added);
}
} }
if ( $commentField =~ /Created an attachment \(/ ) { if ( $commentField =~ /Created an attachment \(/ ) {
...@@ -831,8 +846,12 @@ sub filterEmailGroup ($$$) { ...@@ -831,8 +846,12 @@ sub filterEmailGroup ($$$) {
pop(@filteredList); pop(@filteredList);
} }
# check to see if the person was removed from this email # check to see if the person was added to or removed from
# group. # this email group.
# Note: This was originally written as only removed from
# and was rewritten to be Added/Removed, but for simplicity
# sake, the name "Removeme" wasn't changed.
# http://bugzilla.mozilla.org/show_bug.cgi?id=71912
if ( grep ($_ eq $person, @{$force{$emailGroup}} ) ) { if ( grep ($_ eq $person, @{$force{$emailGroup}} ) ) {
......
...@@ -49,7 +49,7 @@ my @emailGroups = ( ...@@ -49,7 +49,7 @@ my @emailGroups = (
); );
my @emailFlags = ( my @emailFlags = (
'Removeme', 'If I am removed from that capacity', 'Removeme', 'When I\'m added to or removed from this capacity',
'Comments', 'New Comments', 'Comments', 'New Comments',
'Attachments', 'New Attachments', 'Attachments', 'New Attachments',
'Status', 'Priority, status, severity, and milestone changes', 'Status', 'Priority, status, severity, and milestone changes',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment