[Rt-commit] rt branch, 4.4/exclude-one-time-cc-in-txn-squelch, created. rt-4.2.12-505-g1a3b99b

? sunnavy sunnavy at bestpractical.com
Wed Nov 4 12:10:45 EST 2015


The branch, 4.4/exclude-one-time-cc-in-txn-squelch has been created
        at  1a3b99b87237cacc41127cec03d1169534eafbbd (commit)

- Log -----------------------------------------------------------------
commit 1a3b99b87237cacc41127cec03d1169534eafbbd
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Nov 5 00:38:34 2015 +0800

    exclude addresses in UpdateCc and UpdateBcc fields from Squelching
    
    it's meanless to mark them squelched since they will always get notifications.
    since 4.4 they don't have checkboxes in "Scrips and Recipients" section any
    more, and if we don't do this, they will be added to SquelchMailTo attributes
    automatically, which is wrong.
    
    Fixes: I#31386

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index bbc3d29..bf60055 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -3701,6 +3701,12 @@ sub ProcessTransactionSquelching {
         (    ref $args->{'TxnSendMailTo'} eq "ARRAY"  ? @{$args->{'TxnSendMailTo'}} :
          defined $args->{'TxnSendMailTo'}             ?  ($args->{'TxnSendMailTo'}) :
                                                                              () );
+    for my $type ( qw/Cc Bcc/ ) {
+        next unless $args->{"Update$type"};
+        for my $addr ( Email::Address->parse( $args->{"Update$type"} ) ) {
+            $checked{$addr->address} ||= 1;
+        }
+    }
     my %squelched = map { $_ => 1 } grep { not $checked{$_} } split /,/, ($args->{'TxnRecipients'}||'');
     return %squelched;
 }

-----------------------------------------------------------------------


More information about the rt-commit mailing list