On Thu, Sep 13, 2012 at 07:24:38AM +0200, Robert Wysocki wrote: > Dnia 2012-09-11, wto o godzinie 17:51 +0200, Maciej Dobrzanski pisze: > > Gary, > > > > ➢ I bet this is really easy, but I'm stumped. The wiki didn't help me > > either. > > > > If you want to associate times with comments, you need to make sure > > they are stored inside the corresponding transactions. However > > transaction objects are immutable, so you probably can't modify them > > from Scrips. I think you will need to intercept a callback in ticket > > update and update ticket parameters (UpdateTimeWorked) before they > > enter the RT core. > > I think TransactionBatch scrips are meant to do that.
TransactionBatch scrips just run after all the transactions in an update are done, they don't have to do with changing transactions. Also, the TransactionBatch scrip would require you to iterate through all the related transactions to find the right one to update, while the On Correspond scrip living in TransactionCreate would get the right transaction automatically. As noted by Maciej - far and away the easiest thing is to use a callback or some JS to insert a default into the UpdateTimeWorked on Update.html. You can do it from a Scrip, but you have to use a hammer to update the Transactions. -kevin
pgpNj5zvhfBdb.pgp
Description: PGP signature
-------- Final RT training for 2012 in Atlanta, GA - October 23 & 24 http://bestpractical.com/training We're hiring! http://bestpractical.com/jobs
