Question arround scrip and custom condition on comment

Hello everyone

I’m wondering how to do something simple. I would like to call a script not
“on” comment but after the comment insert in the database.

Actually this is my condition :
return 0 unless $self->TransactionObj->Type eq “Comment”;
return 1;

But the script is called when I click “on comment”, how about after the
comment insert in the database ? (with all the transaction done).

Thank you very much
Kind regards / Cordialement

Alexandre Leprevost
Project Engineer / Delivery Team

4 rue de l´Abreuvoir
92 400 Courbevoie
France
al@efficientip.com
Tel : +33 (0)1 75 84 88 98
Fax : +33 (0)9 57 88 09 40

Hello everyone

I’m wondering how to do something simple. I would like to call a script
not “on” comment but after the comment insert in the database.

Actually this is my condition :
return 0 unless $self->TransactionObj->Type eq “Comment”;
return 1;

But the script is called when I click “on comment”, how about after the
comment insert in the database ? (with all the transaction done).

well, when you create a scrip with “On comment” as condition, it is not
called when you click “comment”, but when you submit the comment (or
when a comment is received on the comment queue email address). And
there you have access to all the data provided in this “transaction”.

Also have a look here:

http://requesttracker.wikia.com/wiki/TransactionBatchStage

What do you wan’t to achieve, why do you want to execute after DB
insertion?

Easter-eggs Spécialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

I’m wondering how to do something simple. I would like to call a script not “on” comment but
after the comment insert in the database.

This is how Scrips work. They happen after the transaction is created
(hence the Transaction Create stage).

But the script is called when I click “on comment”, how about after the comment insert in the
database ? (with all the transaction done).

We check for applicable Scrips (by running the Conditions and the
Prepare of the Action) during display of Update.html because of the
boxes that tell you who will get email. Your scrip action will not
actually be executed on display, but only after submission when the
transaction is created.

-kevin