Order of scrip execution

I am using ExtractCustomFieldValues, and it is working fine. However, it
appears that the custom field values are being set /after/ the autoreply
is sent. Since I am using some of the custom field values in the
autoreply, they don’t exist when it is sent.

Is there any way I can force the ExtractCustomFieldValues scrip to run
/before/ the autoreply scrip?

I have looked at the wiki:

http://wiki.bestpractical.com/index.cgi?ScripExecOrder
http://wiki.bestpractical.com/index.cgi?TransactionBatchStage

but those pages just don’t make much sense to me. I enabled batch stage
processing with this:

Set($UseTransactionBatch , 1);

and I made the autoreply stage TransactionBatch, but that made the scrip
not run at all. I put it back to TransactionCreate. The history makes it
look like the CF was added before the autoreply, but that’s not actually
the case:

Sat Jun 11 00:37:49 2005 RT_System - Username testuser added

Sat Jun 11 00:37:49 2005 RT_System - Outgoing email recorded

Note that “Username” is the CF that I am setting from the e-mail.

–df

Dan Fulbright wrote:

and I made the autoreply stage TransactionBatch

You’re on the right track, but TransactionBatch mode has an error that
prevents it from using any of the installed Conditions (at least it did
under 3.2.X; I don’t know about 3.4.X yet). You must use a User Defined
condition to use TransactionBatch mode.

So, for example, if your old scrip was

On Create
Do Something
in TransactionCreate mode

You’ll need to change it to

User Defined
Do Something
in TransactionBatch mode

and write a User Defined condition like

if ($self->TransactionObj->Type eq ‘Create’)
{ return(1); }
else
{ return(undef); }

Rick R.

Rick Russell
For computer help, call xHELP (x4357 or 713-348-4357)
OpenPGP/GnuPG Public Key at ldap://certificate.rice.edu
761D 1C20 6428 580F BD98 F5E5 5C8C 56CA C7CB B669
Helpdesk Supervisor, Client Services
IT/Academic & Research Computing
Rice University
Voice: 713.348.5267 Fax: 713.348.6099

Rick Russell wrote:

Dan Fulbright wrote:

and I made the autoreply stage TransactionBatch

You’re on the right track, but TransactionBatch mode has an error that
prevents it from using any of the installed Conditions (at least it did
under 3.2.X; I don’t know about 3.4.X yet). You must use a User Defined
condition to use TransactionBatch mode.

So, for example, if your old scrip was

On Create
Do Something
in TransactionCreate mode

You’ll need to change it to

User Defined
Do Something
in TransactionBatch mode

and write a User Defined condition like

if ($self->TransactionObj->Type eq ‘Create’)
{ return(1); }
else
{ return(undef); }

Rick R.

This should be fixed in 3.4.3, AFAIK.

and I made the autoreply stage TransactionBatch

You’re on the right track, but TransactionBatch mode has an error that
prevents it from using any of the installed Conditions (at least it did
under 3.2.X; I don’t know about 3.4.X yet). You must use a User Defined
condition to use TransactionBatch mode.

Thanks, Rick! That worked like a charm!

–df