[Rt-commit] rt branch, 4.2/rt-interface-email, created. rt-4.2.9-61-g4520de0

Alex Vandiver alexmv at bestpractical.com
Tue Dec 30 14:35:02 EST 2014


The branch, 4.2/rt-interface-email has been created
        at  4520de0adcafe78be2344059a4b13d7c9ac602ce (commit)

- Log -----------------------------------------------------------------
commit 4520de0adcafe78be2344059a4b13d7c9ac602ce
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Dec 30 14:32:33 2014 -0500

    Add X-RT-Interface: Email to new comments and correspondence
    
    9189e698 introduced the X-RT-Interface: header, to allow for automated
    detection of the source of a comment or correspondence.  However, the
    header was only explicitly set for incoing email during ticket creation,
    not during updates; as such, updates were marked as X-RT-Interface: API.
    
    Ensure that the header is added to all incoming email, not just those
    that take the Create path.
    
    Fixes: I#30388

diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index d2e9bb5..9e091f7 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -1412,6 +1412,8 @@ sub Gateway {
         return ( 0, $result, undef );
     }
 
+    $head->replace('X-RT-Interface' => 'Email');
+
     # if plugin's updated SystemTicket then update arguments
     $args{'ticket'} = $SystemTicket->Id if $SystemTicket && $SystemTicket->Id;
 
@@ -1431,8 +1433,6 @@ sub Gateway {
             );
         }
 
-        $head->replace('X-RT-Interface' => 'Email');
-
         my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
             Queue     => $SystemQueueObj->Id,
             Subject   => $NewSubject,

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


More information about the rt-commit mailing list