Khusro,
You do not need a Custom Field to do this. The transaction content is
available at “Resolve” time via a code in your template. We do this. We
created our own “Resolve” template and deleted the delivered one. This
is our code:
This ticket has been resolved. DO NOT REPLY to this message!
TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->Id}
Priority is: {$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}
Development Started on: {substr($Ticket->Started, 0, 10)}
Description of Issue:
{$Ticket->FirstCustomFieldValue(‘Description’)}
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, enter URL:
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
Hope this helps.
Kenn
LBNLOn 7/7/2009 2:13 AM, Khusro Jaleel wrote:
Hi,
I’m quite new to RT and wondering how to do the following.
I need to resolve a ticket when an email is sent to the queue resolve
address, for example, myqueue-resolve@domain.com. This is fine, and I
have managed to do this by adding a new ‘rt-mailgate’ command with an
action of ‘resolve’ to my /etc/aliases file.
However, the person sending this email will include some text describing
the reason for resolving the ticket, among other things, and I would
like this text to be added to the ticket when it is resolved and I can’t
find a way to do this.
I tried creating a custom scrip with a custom template of
${Transaction->Content()} or something like that, but it didn’t work.
Any help appreciated.
Thanks,
Khusro
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com