Autoreply scrip doesnt execute

This afternoon I installed RT 3.6.4, Ive setup a queue, I can email into it, I can get a response to say a ticket has been created, but I cannot seem to get it to reply with my own custom message.

Unless Im missing something so bleedingly obvious, this is what Ive done:

  1. Click on Configuration, Queues, select my queue, click Templates, and create a template
  2. click on Scrips, then New scrip, and add a scrip using the following parameters:

Description: Requestor creates ticket
Condition: On Create
Action: Autoreply To Requestors
Template: the template I created above
Stage: TransactionCreate

  1. send a new test email to my queue

However, I still receive an auto reply message as per the global default template.

Ive tried logging out of RT then back in, disabling the global default (afterwhich I dont receive any auto response at all, so clearly it is relying on the global default scrip), and even restarting Apache but still it doesnt send my message.

Ive got Apache 1.3.33 running on FreeBSD 5.3, its a little bit old I know, but this is my play/dev box :slight_smile:

Have I missed something, or is it not working as it should?

Thanks!

Hi Tom,

Try naming your local template Autoreply

If a queue template has the same name as a global template it will be used
instead of the global. I think this is what you want.

It would seem that your scrip should work, but it might be that RT only
triggers one scrip per transaction and that the global OnCreate is winning
the coin toss. Early on I disabled every global scrip and just create the
ones that I need locally. This way there are no surprises when RT sends a
reply that I didn’t want sent. I do have 1 global scrip, but I wrote it
and I know that I want it to work across all queues (it’s an e-mail
password reset scrip).

Regards,
Gene

At 04:38 AM 7/22/2007, Tom Storey wrote:

This afternoon I installed RT 3.6.4, Ive setup a queue, I can email into
it, I can get a response to say a ticket has been created, but I cannot
seem to get it to reply with my own custom message.

Unless Im missing something so bleedingly obvious, this is what Ive done:

  1. Click on Configuration, Queues, select my queue, click Templates, and
    create a template
  2. click on Scrips, then New scrip, and add a scrip using the following
    parameters:

Description: Requestor creates ticket
Condition: On Create
Action: Autoreply To Requestors
Template: the template I created above
Stage: TransactionCreate

  1. send a new test email to my queue

However, I still receive an auto reply message as per the global default
template.

Have I missed something, or is it not working as it should?

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Hi Gene,

Thanks for your suggestion.

When I name my template Autoreply (previously it was named “tunnel: Autoreply”, for the “tunnel” queue), I dont get any response at all, not even the default template :slight_smile:

I did also try naming my scrip Autoreply, but same result. When the Template is named Autoreply, nothing happens at all.

I do get automatic reply when I resolve the tickets, however.

Any other suggestions?

I really would prefer to avoid having to use the global default as I would like to convey queue specific information to requestors.

Thanks,
Tom----- Original Message -----
From: Gene LeDuc
To: Tom Storey
Cc: RT-Users@lists.bestpractical.com
Sent: Tuesday, July 24, 2007 1:53 AM
Subject: Re: [rt-users] Autoreply scrip doesnt execute

Hi Tom,

Try naming your local template Autoreply

If a queue template has the same name as a global template it will be used instead of the global. I think this is what you want.

It would seem that your scrip should work, but it might be that RT only triggers one scrip per transaction and that the global OnCreate is winning the coin toss. Early on I disabled every global scrip and just create the ones that I need locally. This way there are no surprises when RT sends a reply that I didn’t want sent. I do have 1 global scrip, but I wrote it and I know that I want it to work across all queues (it’s an e-mail password reset scrip).

Regards,
Gene

At 04:38 AM 7/22/2007, Tom Storey wrote:

This afternoon I installed RT 3.6.4, Ive setup a queue, I can email into it, I can get a response to say a ticket has been created, but I cannot seem to get it to reply with my own custom message.
 
Unless Im missing something so bleedingly obvious, this is what Ive done:
 
1. Click on Configuration, Queues, select my queue, click Templates, and create a template
2. click on Scrips, then New scrip, and add a scrip using the following parameters:
 
Description: Requestor creates ticket
Condition: On Create
Action: Autoreply To Requestors
Template: the template I created above
Stage: TransactionCreate
 
3. send a new test email to my queue
 
However, I still receive an auto reply message as per the global default template.
 
Have I missed something, or is it not working as it should?

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Nevermind I got it working.

Seems it doesnt like it if the template doesnt have “Subject: AutoReply: {$Ticket->Subject}” at the beginning of it, which Im assuming must be an actual email header for the subject.

Now its working.

Though I ran into a second issue which Ive since resolved too, which was that I was then getting two autoresponses to say the ticket had been created. That was fixed easily enough by disabling the global default. Something I would have also preferred to not neccessarily have to do, but I can live with creating scrips and templates for each queue more than I can live with having to only use the global default :slight_smile:

Now if only I had found that in some documentation somewhere… :stuck_out_tongue:

Thanks again!----- Original Message -----
From: Tom Storey
To: Gene LeDuc
Cc: RT-Users@lists.bestpractical.com
Sent: Tuesday, July 24, 2007 8:32 PM
Subject: Re: [rt-users] Autoreply scrip doesnt execute

Hi Gene,

Thanks for your suggestion.

When I name my template Autoreply (previously it was named “tunnel: Autoreply”, for the “tunnel” queue), I dont get any response at all, not even the default template :slight_smile:

I did also try naming my scrip Autoreply, but same result. When the Template is named Autoreply, nothing happens at all.

I do get automatic reply when I resolve the tickets, however.

Any other suggestions?

I really would prefer to avoid having to use the global default as I would like to convey queue specific information to requestors.

Thanks,
Tom
----- Original Message -----
From: Gene LeDuc
To: Tom Storey
Cc: RT-Users@lists.bestpractical.com
Sent: Tuesday, July 24, 2007 1:53 AM
Subject: Re: [rt-users] Autoreply scrip doesnt execute

Hi Tom,

Try naming your local template Autoreply

If a queue template has the same name as a global template it will be used instead of the global.  I think this is what you want.

It would seem that your scrip should work, but it might be that RT only triggers one scrip per transaction and that the global OnCreate is winning the coin toss.  Early on I disabled every global scrip and just create the ones that I need locally.  This way there are no surprises when RT sends a reply that I didn't want sent.  I do have 1 global scrip, but I wrote it and I know that I want it to work across all queues (it's an e-mail password reset scrip).

Regards,
Gene

At 04:38 AM 7/22/2007, Tom Storey wrote:

  This afternoon I installed RT 3.6.4, Ive setup a queue, I can email into it, I can get a response to say a ticket has been created, but I cannot seem to get it to reply with my own custom message.
   
  Unless Im missing something so bleedingly obvious, this is what Ive done:
   
  1. Click on Configuration, Queues, select my queue, click Templates, and create a template
  2. click on Scrips, then New scrip, and add a scrip using the following parameters:
   
  Description: Requestor creates ticket
  Condition: On Create
  Action: Autoreply To Requestors
  Template: the template I created above
  Stage: TransactionCreate
   
  3. send a new test email to my queue
   
  However, I still receive an auto reply message as per the global default template.
   
  Have I missed something, or is it not working as it should?

Gene LeDuc, GSEC
Security Analyst
San Diego State University 

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

At Tuesday 7/24/2007 07:25 AM, Tom Storey wrote:

Nevermind I got it working.

Seems it doesnt like it if the template doesnt have “Subject:
AutoReply: {$Ticket->Subject}” at the beginning of it, which Im
assuming must be an actual email header for the subject.

Tom,

A template should either have an email header as the first line (with
at least one blank line between headers and the message body) or no
headers, but at least one blank line at the top. Another way of
saying that is headers are optional, but you always need at least one
blank line before the body. You may have found them, but the RT log
would probably have shown error messages from the invalid template.

Steve

Steve,

Thanks for the info. Its all comming together now.

I guess some sort of error message or warning in the web interface when
creating the template would have been helpful, rather than having to
experiment (as I have been doing) or looking into log files to determine
what the issue is.

Surely it cant be too hard to implement a series of validations to at the
very least point out to the user that the information they have supplied is
incorrect and might not work.

Would have saved me some head scratching :slight_smile:

Perhaps its documented better in places I havnt looked yet, though I’d have
thought the documentation on the BP website would have been thorough enough.
I found it quite lacking for a beginner at administering RT (Ive used RT in
the past, but only as a user processing tickets).

Thanks again.----- Original Message -----
From: “Stephen Turner” sturner@MIT.EDU
To: RT-Users@lists.bestpractical.com
Sent: Tuesday, July 24, 2007 11:02 PM
Subject: Re: [rt-users] Autoreply scrip doesnt execute

At Tuesday 7/24/2007 07:25 AM, Tom Storey wrote:

Nevermind I got it working.

Seems it doesnt like it if the template doesnt have “Subject:
AutoReply: {$Ticket->Subject}” at the beginning of it, which Im
assuming must be an actual email header for the subject.

Tom,

A template should either have an email header as the first line (with
at least one blank line between headers and the message body) or no
headers, but at least one blank line at the top. Another way of
saying that is headers are optional, but you always need at least one
blank line before the body. You may have found them, but the RT log
would probably have shown error messages from the invalid template.

Steve


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

Tom,

I had the same problem in terms of the blank line requirement after 

headers. However, on page 137 of the Essentials book, there is a little
comment about content in a template and it reads “RT treats each line as
a header until it finds a blank line”. I guess I was supposed to
intuitively figure that a blank line is needed after the header. Oh
well. nice to see I’m not so odd after all.
As to global scrips and templates, I have disabled all except
correspondence and replaced them with our own with different names using
our own templates (different names as well). No duplicate E_mails and
they all work fine. You might want to come up with a naming scheme for
the types of notification scrips you will want and disable all other
scrips for the same actions.

Kenn
LBNL

Tom Storey wrote: