[rt-users] Templates with queue name in subject
Troy Davis
troy at nack.net
Wed Jun 9 23:10:07 EDT 2004
Here are templates that insert the queue name in the email subject. The
only examples I found in the list archives don't check whether the queue
name is already in the subject, so each successive email responses makes
RT add the queue name again (Re: (blah) Re: (blah) RT-12345 Whatever).
I used a second variable for the queue name regex because using
$Ticket->QueueObj->Name directly wasn't being interpolated and I didn't
care enough to find out why.
Correspondence template:
RT-Attach-Message: yes
Subject: { my $s = ($Transaction->Subject||$Ticket->Subject); $s =~ s/^Re\:\ //i; my $qn = ($Ticket->QueueObj->Name); $s =~ s/\($qn\)\ //; $s = "(" . ($Ticket->QueueObj->Name) . ") " . $s; $s;}
{$Transaction->Content()}
Admin Comment template:
Subject: { my $s = ($Transaction->Subject||$Ticket->Subject); $s =~ s/^Re\:\ //i; my $qn = ($Ticket->QueueObj->Name); $s =~ s/\($qn\)\ //; $s =~ s/\[Comment\]\ //g; $s = "(" . ($Ticket->QueueObj->Name) . ") [Comment] " . $s; $s;}
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
This is a comment. It is not sent to the Requestor(s):
{$Transaction->Content()}
More information about the rt-users
mailing list