[rt-users] Creating a Transaction from the Scrip

Ruslan Zakirov ruslan.zakirov at gmail.com
Sat Aug 12 00:37:36 EDT 2006


On 8/11/06, Stefan Franck <stefan.franck at interactive-objects.com> wrote:
> Hello,
>
> I have some problem with generating a new Transaction from Scratch in a
> scrip.
>
> If a new ticket is created, some custom field values are changed
> according to the content of this new ticket. I used the
> AddCustomFieldValue method which works fine.
>
> Whenever the respective custom field changes a notification mail shall
> be sent. This changes could occur as described above or by manual
> changes via the interface.
>
> So I guess the best way to implement this is to react on any Transaction
> which changes the CustomFieldValue; but then it does not work on Ticket
> creation, since the AddCustomFieldValue sets the value without creating
> its own Transaction.
Yep, create doesn't record any transaction except one of the 'Create'
type. This means you have transaction and could do what you want. You
just need scrip with condition "on create and only if value was set or
on value change". Does it look good? I think this should work.


> How can I make it work as a Transaction?
> Is it sufficient to add the Transaction to the database, or do I have to
> set the value manually in the scrip and add the Transaction?
> Does the Transaction added by a scrip start the new scrip, too, or do I
> have to trigger it explicitly?
> What values are necessary for a Transaction definition?
>
> I'm a little bit lost here, and the wiki did not help much.
>
> Thank you very much,
> Stefan
> _______________________________________________
> 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
>


-- 
Best regards, Ruslan.



More information about the rt-users mailing list