[rt-users] Add resolution comment to mail

Kenneth Crocker kfcrocker at lbl.gov
Wed Aug 25 11:56:55 EDT 2010


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
LBNL

On Wed, Aug 25, 2010 at 5:11 AM, Steven Platt <Steven.Platt at hpa.org.uk>wrote:

> 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!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100825/75575128/attachment.htm>


More information about the rt-users mailing list