[Rt-commit] rt branch, 4.4/exclude-one-time-cc-in-txn-squelch, created. rt-4.4.0rc2-16-g251d581

Shawn Moore shawn at bestpractical.com
Tue Dec 8 12:47:34 EST 2015


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

- Log -----------------------------------------------------------------
commit 251d5817242c0e7cb0791998b94f3abc1e186fe6
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 ab13a43..820f584 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