Hi Kenn,
My better half always tells me to never assume, it makes an ass of you
and me J. But in this case you are right on the money. That is exactly
what I was looking for.
Many thanks, JimFrom: Kenneth Crocker [mailto:kenn.crocker@gmail.com]
Sent: 20 February 2012 19:15
To: Jim Tambling
Subject: Re: [rt-users] No transaction content
Jim,
I’m assuming (yea, we all know how THAT’S spelled) that you are
referring to the comments made in the box when resolving a ticket. If my
assumption is correct, then those comments can be made available to a
template. Of course, you have to have a scrip to send that template on
the resolve condition. Here it is:
Subject: Request Titled: “{$Ticket->Subject}” has been Resolved
TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->id}
Subject: {$Ticket->Subject}
Priority : {$Ticket->Priority}
Requestor: {$Ticket->Requestors->UserMembersObj->First->Name}
Created by: {$Ticket->CreatorObj->Name}
Created on: {substr($Ticket->Created, 0, 10)}
Owned by: {$Ticket->OwnerObj->Name}
Description of Issue:
{$Ticket->Transactions->First->Content}
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 this ticket, click the URL below:
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
Thank you,
{$Ticket->QueueObj->CorrespondAddress()}
Now, you will also notice the code in there that grabs the “FIRST”
transaction content. That particular code can be modified in and of
itself to grab other types of transaction content if you know how to
navigate it.
Anyway, like I said, if my assumption is correct, this template will
give you the content entered in comments when resolving the ticket.
Hope this helps.
Kenn