[rt-users] Possible to strip rtname from subject in specific cases?

Gene LeDuc gleduc at mail.sdsu.edu
Wed Oct 31 12:31:49 EDT 2007


Hi Doro,

I needed a way to strip the ticket info from the subject line also, but 
couldn't find anything within RT that would let me do this.  I ended up 
modifying the SetSubjectToken method of Sendmail.pm so that I could 
selectively turn off the feature that adds the [myrt #1234] token to the 
beginning of the subject.

To disable the "add ticket info" feature, you add a "secret code" to the 
beginning of the subject line in your template.  If the code is there, my 
mod strips it and then sends the e-mail with the original subject line 
unchanged.  If the code isn't there, the subject line gets modified as 
usual.  You set a variable ($DisableSubjectToken) in RT_SiteConfig.pm to 
some random sequence of characters that are not likely to ever show up at 
the beginning of one of your ticket subjects and prepend that variable to 
your subject line in your template when you want to turn off ticket stamping.

It may be overkill, but it works great for us and stays out of the way 
unless I need it.  Here's where you can find it:

http://wiki.bestpractical.com/view/SendEmail

The documentation might be a little muddy, so feel free to ask if you can't 
figure it out.

Regards,
Gene

At 04:11 AM 10/31/2007, Dorothea Muecke-Herzberg wrote:
>Previous email to the list brought back to my mind an issue we have. We 
>need to send emails to
>another tool from RT and this tool scans the start of the subject line, so 
>we need to
>strip rtname from the subject line somehow (or at least move it to the end).
>Is there a way to do this?
>
>Doro


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20071031/806da66e/attachment.htm>


More information about the rt-users mailing list