[rt-users] Scrips being executed twice for a simple CF update

Kevin Falcone falcone at bestpractical.com
Fri Sep 14 13:40:46 EDT 2012


On Mon, Sep 10, 2012 at 04:57:33PM -0400, Jeff Blaine wrote:
> Upon modification of one of our custom fields (text area),
> we want to parse the data, perform a translation on the
> original data, and store the results in the custom field.
> With loads of RT::Logger debugging in place, everything appears
> to be working fine except for the for the fact that the Scrip
> is being called twice, and it's performing the change ... then
> UNDOING IT:

I suspect you're running into the processing order of updates on the
Basics page. You can try making the Scrip TransactionBatch and see if
that resolves it.

Keep in mind that TransactionCreate scrips don't see all the updates
done on that page at once, it sees them piecemeal.

-kevin

> Sep 10 16:24:39 rtdev2 RT: START SCRIP processing OurField
> Sep 10 16:24:39 rtdev2 RT: OurField changed: OLD '' NEW '26 34'
> Sep 10 16:24:39 rtdev2 RT: OurField: In main chunk
> Sep 10 16:24:39 rtdev2 RT: OurField: 2 values found
> Sep 10 16:24:39 rtdev2 RT: OurField: Processing: '26'
> Sep 10 16:24:39 rtdev2 RT: OurField: Processing: '34'
> Sep 10 16:24:39 rtdev2 RT: OurField: Final string: 'X Y'
> Sep 10 16:24:39 rtdev2 RT: OurField reached final return 1
> Sep 10 16:24:39 rtdev2 RT: START SCRIP processing OurField
> Sep 10 16:24:39 rtdev2 RT: OurField changed: OLD 'X Y' NEW ''
> Sep 10 16:24:39 rtdev2 RT: OurField: In main chunk
> Sep 10 16:24:39 rtdev2 RT: OurField: 0 values found
> Sep 10 16:24:39 rtdev2 RT: OurField: Final string empty, so clearing
> out OurField entirely
> Sep 10 16:24:39 rtdev2 RT: OurField reached final return 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120914/587c7e45/attachment.sig>


More information about the rt-users mailing list