Changing Admin Correspondance Template

This is probably a really easy question, but I’ve spent the last few
hours looking through the past mailings on here to see if anyone
addressed it and I can’t find it.

Basically I’d like to include the first entry from the ticket history
(likely to be the description of the problem) in any email that is sent
out about the ticket. I guess this might mean editing the transaction
template as well. Also I’d like the to include whatever the last entry
in the ticket history is, so that the person can easily see what was
last done, or what comments were made before the ticket was assigned to
them, or they were added as adminCC.

Thanks for your help.

Michael Leighty

Michael;

Try this (you add it to the bottom of the template you want to change):

The initial request was:
{
my $cont = ‘’;
my $trans = $Ticket->Transactions;
$trans->Limit(FIELD => ‘Type’, VALUE => ‘Create’);
while (my $tran = $trans->Next) {
my $attach = $tran->Attachments;
while (my $msg = $attach->Next){
next unless $msg->ContentType =~ m!^(text/plain|message|text$)!i;
my $content = $msg->Content;
next unless $content;
next if $cont eq $content;
$cont = $content;
my $wrapper = Text::Wrapper->new(columns=>70);
$cont = $wrapper->wrap($cont);
}
}
$cont ;
}

Roy

Michael Leighty wrote:

Michael,

We did this by creating a Custom Field called "Description" and putting 

the subject line in it if the ticket came from E_mail. The Field is
mandatory so that when an owner opens it, he must put info in the field.
The subject data gives him a start. When the ticket is resolved, we
modified the template to display the CF “Description” and then display
the “Resolve” Comments on the e_mail. It works nicely and our users,
especially those who have about 1,000 a year, like it because the
description reminds them of what they were asking for in the first place.

Kenn
LBNL

Michael Leighty wrote:

Thanks for your response Roy.

What would it take to include the last item in the ticket history as
well as the first.

Thanks again.From: Roy El-Hames [mailto:rfh@pipex.net]
Sent: Wednesday, September 06, 2006 10:52 AM
To: Michael Leighty
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Changing Admin Correspondance Template

Michael;

Try this (you add it to the bottom of the template you want to change):

The initial request was:
{
my $cont = ‘’;
my $trans = $Ticket->Transactions;
$trans->Limit(FIELD => ‘Type’, VALUE => ‘Create’); while (my $tran =
$trans->Next) {
my $attach = $tran->Attachments;
while (my $msg = $attach->Next){
next unless $msg->ContentType =~ m!^(text/plain|message|text$)!i;
my $content = $msg->Content;
next unless $content;
next if $cont eq $content;
$cont = $content;
my $wrapper = Text::Wrapper->new(columns=>70);
$cont = $wrapper->wrap($cont);
}
}
$cont ;
}

Roy

Michael Leighty wrote:

This is probably a really easy question, but I’ve spent the last few
hours looking through the past mailings on here to see if anyone
addressed it and I can’t find it.

Basically I’d like to include the first entry from the ticket history
(likely to be the description of the problem) in any email that is
sent out about the ticket. I guess this might mean editing the
transaction template as well. Also I’d like the to include whatever
the last entry in the ticket history is, so that the person can easily

see what was last done, or what comments were made before the ticket
was assigned to them, or they were added as adminCC.

Thanks for your help.

Michael Leighty



The rt-users Archives

Community help: http://wiki.bestpractical.com Commercial support:
sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com