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;
> }
> -------------------------------------------------------------------------------
>
>
> ===========================================================================================
>
>
>
>
>
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com