[Rt-commit] rt branch, 4.4/canonicalize-email-comparisons, created. rt-4.4.0-71-g4333c9c
Dustin Graves
dustin at bestpractical.com
Fri Apr 29 15:00:59 EDT 2016
The branch, 4.4/canonicalize-email-comparisons has been created
at 4333c9c6ac258626bdf348189eb5fd553c90d648 (commit)
- Log -----------------------------------------------------------------
commit 4333c9c6ac258626bdf348189eb5fd553c90d648
Author: Dustin Graves <dustin at bestpractical.com>
Date: Fri Apr 29 18:55:57 2016 +0000
canonicalize email comparison in UpdateCc and AddWatchers
This fixes duplicate e-mails on AddWatchers and requestors showing up in
One-time Cc and One-time Bcc lists
Fixes: I#31938, I#31939
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index bd17619..6133ca2 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -1059,6 +1059,7 @@ sub TransactionAddresses {
while ( my $att = $attachments->Next ) {
foreach my $addrlist ( values %{$att->Addresses } ) {
foreach my $addr (@$addrlist) {
+ $addr->address( lc $addr->address ); # force lower-case
# Skip addresses without a phrase (things that are just raw addresses) if we have a phrase
next
diff --git a/share/html/Ticket/Elements/UpdateCc b/share/html/Ticket/Elements/UpdateCc
index 6101139..ec241f9 100644
--- a/share/html/Ticket/Elements/UpdateCc
+++ b/share/html/Ticket/Elements/UpdateCc
@@ -87,11 +87,11 @@ $TicketObj
</%args>
<%init>
my %txn_addresses = %{$TicketObj->TransactionAddresses};
-my @req_addresses = split /,/, $TicketObj->RequestorAddresses;
+my @req_addresses = Email::Address->parse( $TicketObj->RequestorAddresses );
my @one_time_Ccs;
foreach my $addr ( keys %txn_addresses) {
- next if ( grep {$addr eq $_} @req_addresses );
+ next if ( grep {$addr eq lc $_->address} @req_addresses );
push @one_time_Ccs,$addr;
}
</%init>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list