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

Ken Crocker kfcrocker at lbl.gov
Tue Jul 7 14:52:37 EDT 2009


Khusro,

My mistake. I thought you had said you already had code similar to what 
I sent you. What you just sent looks a lot like my code. At this point, 
I have no idea why your not getting a comment as ours works quite well. 
Unless, of course, we are missing the obvious, which is "Is someone 
actually entering a comment when they Resolve the ticket"? Sorry I can't 
help.

Kenn
LBNL

On 7/7/2009 11:06 AM, Khusro Jaleel wrote:
> 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