[rt-users] Resolve ticket and include message body in ticket

Khusro Jaleel mailing-lists at kerneljack.com
Tue Jul 7 14:06:58 EDT 2009


Ken Crocker wrote:
> Khusro,
> 
> Must be your code. Can you send it?

It's just the following, in a new template:

===========================================================================================
According to our records, your request has been resolved. If you have 
any further questions, please respond to this message.
-------------------------------------------------------------------------------
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;
     }
-------------------------------------------------------------------------------
===========================================================================================





More information about the rt-users mailing list