[rt-users] Scrip for adding to the custom field based on another CF
Alex Peters
alex at peters.net
Wed Jan 21 17:20:45 EST 2015
Sorry, yes, that one.
There are some "preview" operations that run the prepare code on the
assumption that nothing will change. In such circumstances, your custom
field would be set even before someone hits the "Update" button. It's
always best not to have the Prepare code make any changes.
The "cleanup" box should probably be renamed, since everywhere else it
seems to be known as "commit." The distinction would be clearer.
The commit code won't run unless the prepare code returns a true value, so
in that box you could write "1;" to ensure that the commit code always runs.
On Thu, 22 Jan 2015 9:16 am Kevin Squire <gentgeen at wikiak.org> wrote:
> I was not aware of this.
>
> When you say "Commit box", are you referring to the "Custom action
> cleanup code" box?
>
>
>
> On Wed, 21 Jan 2015 21:35:47 +0000
> Alex Peters <alex at peters.net> wrote:
>
> > You should move your scrip code from the Prepare box to the Commit
> > box. Making changes to tickets in the Prepare stage of a transaction
> > can cause unintended side effects and is not recommended.
> >
> --
> http://www.wikiak.org
>
> #############################################################
> Associate yourself with men of good quality if you esteem
> your own reputation; for 'tis better to be alone then in bad
> company. - George Washington, Rules of Civility
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150121/44fe74fb/attachment.htm>
More information about the rt-users
mailing list