RT 3.2 PATCH RT/Interface/Email.pm

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 ) {

Apologies… I forgot to chomp the $Subject in my last patch. I’ve
attached a revised one below.

Index: Email.pm
RCS file: /var/db/cvs/rt-3-2/lib/RT/Interface/Email.pm,v
retrieving revision 1.1
retrieving revision 1.3
diff -c -r1.1 -r1.3
*** Email.pm 10 Jul 2004 01:11:49 -0000 1.1
— Email.pm 12 Jul 2004 18:30:31 -0000 1.3
*** 515,520 ****
— 515,524 ----
$AuthStat = $NewAuthStat if $NewAuthStat > $AuthStat;
last if $AuthStat == -1;
}

  • # Reload the subject, which might have changed within a plugin
    
  • $Subject = $head->get('Subject');
    
  • chomp $Subject;
    
    # {{{ If authentication fails and no new user was created, get
    

out.
if ( !$CurrentUser or !$CurrentUser->Id or $AuthStat == -1 ) {