[Rt-commit] rt branch, 4.2/create-squelching, created. rt-4.2.13-74-gabad2b0

Shawn Moore shawn at bestpractical.com
Fri Dec 16 13:47:44 EST 2016


The branch, 4.2/create-squelching has been created
        at  abad2b019ffcf49a10563f17f150aca0426c2787 (commit)

- Log -----------------------------------------------------------------
commit abad2b019ffcf49a10563f17f150aca0426c2787
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Fri Dec 16 13:40:58 2016 -0500

    Squelch all, not just first, address on ticket create
    
    RT::Ticket->Create is documented to accept the argument
    SquelchMailTo as an array reference of email addresses. This arrayref is
    unpacked into an array and passed to method _SquelchMailTo, which only
    processes its first argument, resulting in only the first email address passed
    to Create getting squelched.
    
    Fixes: T#174642

diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index f3c97c1..d447585 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -469,7 +469,7 @@ sub Create {
     if ($args{'SquelchMailTo'}) {
        my @squelch = ref( $args{'SquelchMailTo'} ) ? @{ $args{'SquelchMailTo'} }
         : $args{'SquelchMailTo'};
-        $self->_SquelchMailTo( @squelch );
+        $self->_SquelchMailTo( $_ ) for @squelch;
     }
 
     # Add all the custom fields

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


More information about the rt-commit mailing list