I’d like to be able to make use of the keywords that I have set in a
queue and use whatever is set in a scrip.
More specifically, I’d like to be able to add the first keyword that
appears for the ticket to the subject line to get something like:
‘first’ is unreliable when multiple keywords can be applied to a ticket.
[rtname #22] [support] Rest of the subject line here.
I have the following snippet in my correspondence template, to end up with
headers such as:
X-RT-Keyword: Magic keyword
You could change this to add a particular keyword to the subject line.
Something like this should probably be a KeywordsAsString method in
I guess that if I know the particular Id I want from KeywordSelects, I
could use it in a per-queue template.
However, I tried this snippet and put it as my correspond template
(neatening out the formatting a little), but I see no sign of the header
in the mail that is sent out at all.
Right now, my correspond template looks as follows:
my $retval = undef;
my $keywdsels = $Ticket->QueueObj->KeywordSelects;
while ( my $keywdsel = $keywdsels->Next() )
my $keywds = $Ticket->KeywordsObj( $keywdsel->Id );
while( my $keywd = $keywds->Next() )
$retval .= “X-RT-Keyword: " .
$keywd->KeywordObj->RelativePath($keywdsel->KeywordObj ) .
chomp( $retval );
Am I missing something somewhere?