Add resolution comment to mail

Hi,

I would like to include the text of the resolution comment in an email
template. Is this still the recommended method?

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

We’re using RT v3.6.2 … old I know but functional for our needs, so
far.

Thanks

Steve

Dr Steven Platt
Bioinformatician
Health Protection Agency
London
The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk

Steven,

Add this to you template:

Resolution comment:
{
my $Resolution_Comment;
my $Transactions;
my $CommentObj;

$Transactions = $Ticket->Transactions;
$Transactions->Limit( FIELD => ‘Type’, VALUE => ‘Comment’ );
$Transactions->OrderByCols(
{ FIELD => ‘Created’, ORDER => ‘DESC’ },
{ FIELD => ‘id’, ORDER => ‘DESC’ },
);

$CommentObj = $Transactions->First;

if ($CommentObj && $CommentObj->id)
{
$Resolution_Comment = $CommentObj->Content;
}
else
{
$Resolution_Comment = “No comment.”
}

return $Resolution_Comment;
}
To view ticket information, click the URL below:

{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

Hope this helps.

Kenn
LBNLOn Wed, Aug 25, 2010 at 5:11 AM, Steven Platt Steven.Platt@hpa.org.ukwrote:

Hi,

I would like to include the text of the resolution comment in an email
template. Is this still the recommended method?

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

We’re using RT v3.6.2 … old I know but functional for our needs, so
far.

Thanks

Steve

Dr Steven Platt
Bioinformatician
Health Protection Agency
London


The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk


RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!