Scrips/template issue

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. 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

Hi Robert,

If you are both the requestor and the person who resolves the ticket, by
default you won’t get an e-mail. By default, RT never (except for
autoreply) sends the person who does the transaction an e-mail because it
assumes you know what you did. To change this behavior, set the
NotifyActor variable in your RT_Siteconfig file to 1 and restart your web
server.

I you are testing this with a ticket where the resolver and requestor are
different, then there’s a different problem.

Regards,
Gene

At 10:54 AM 9/16/2008, 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 http://3.6.6.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"

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Content:
"Your request has been completed …
If you have any further questions or concerns, please respond to this
message.

The IT Service Team"

Robert,

You need a blank line at the beginning of the template. Also, if you check
the RT log you should see error messages in this case.

Steve

Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

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):

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 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



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

Hi Ken,

thank you for that example. I was looking for something like that. I was
wandering how I could include some of the fields you have listed in your
example. Again thanks to everyone for the fast help.

Robert Keidel