[rt-users] scrips/template issue
Kenneth Crocker
KFCrocker at lbl.gov
Wed Sep 17 15:55:40 EDT 2008
Robert,
Here is a template we use and it works fine. It includes different
ticket data so you will have an example of the kind of things you can
do. Remember the blank line after the Header (Subject line):
Subject: Request Titled: "{$Ticket->Subject}" has been Resolved!
This ticket has been resolved. DO NOT REPLY to this message!
-----------------------------------------------------------------------------
TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->Id}
Subject: {$Ticket->Subject}
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
LBNL
On 9/16/2008 10:54 AM, Robert Keidel wrote:
> Hello,
>
> I have an issue with the scrip/template "on resolve". I changed the
> original template of that scrip with a template I wanted to use.
> Unfortunately it did not work, it did not send out an email "on
> resolve". So I went back to the template what worked before just fine,
> but RT is still not sending out any email when I resolve a ticket. What
> did I do wrong? I hope you guys understand what I try to explain here. I
> also tried to enable logging in RT_SiteConfig.pm to see what is going
> on, but that did not work either. I am running on Ubuntu 8.04 server;
> mysql5; apache2; fastcgi and the RT version is 3.6.6. <http://3.6.6.>
> Thank you for any clue you can give me.
>
> The scrip and template:
>
> Description: empty
> Condition: On Resolve
> Action: Notify Requestors
> Template: Global template: Resolved
> Stage: TransactionCreate
>
> The template:
> Name: Resolved
> Description: Ticket Resolved
> Content:
> "Your request has been completed ........
> If you have any further questions or concerns, please respond to this
> message.
>
> The IT Service Team"
>
>
>
>
> Robert Keidel
>
> IRIS International
> 9158 Eton Ave
> Chatsworth, CA 91311
> 818-709-1244 x 7353
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
More information about the rt-users
mailing list