[Rt-devel] RT 3.2 PATCH RT/Interface/Email.pm

Chad Scott chad at idworld.net
Mon Jul 12 14:24:08 EDT 2004


This (extremely simple) patch reloads the subject line after the various
configured mail plug-ins are run.

This allows a plug-in to revise the ticket subject.

The old behavior would allow the plug-in to revise the subject in the
attachment, but a newly created ticket would have the old subject since
it is loaded before the plug-ins are run.

Index: Email.pm
===================================================================
RCS file: /var/db/cvs/rt-3-2/lib/RT/Interface/Email.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -r1.1 -r1.2
*** Email.pm    10 Jul 2004 01:11:49 -0000      1.1
--- Email.pm    12 Jul 2004 18:14:37 -0000      1.2      
***************
*** 515,520 ****
--- 515,523 ----
          $AuthStat = $NewAuthStat if $NewAuthStat > $AuthStat;
          last if $AuthStat == -1;
      }
+
+     # Reload the subject, which might have changed within a plugin
+     $Subject = $head->get('Subject');
   
      # {{{ If authentication fails and no new user was created, get
out.
      if ( !$CurrentUser or !$CurrentUser->Id or $AuthStat == -1 ) {




More information about the Rt-devel mailing list