[rt-users] How to detect a custom field change in a scrip

Kenneth Crocker kfcrocker at lbl.gov
Thu Apr 29 12:40:17 EDT 2010


Lobo,

Do you REALLY care what the old value was? We use Custom Fields as triggers
on a lot of scrips, but we really don't care what it used to be. We only
care that it has changed and what it has changed to. It makes the code
easier to write and debug.

Kenn
LBNL

On Thu, Apr 29, 2010 at 6:58 AM, <lobo+rt at mental.com
<lobo%2Brt at mental.com>>wrote:

> Hiya, we use custom fields and they work well so far.
>
> Now I'd like to do something in a scrip if the content of
> one of my custom fields changes, say, from "foo" to "bar".
> I know how to check if the field is "bar", but I don't know
> how to find out if it always has been "bar" before, or if
> the user just changed it from "foo".
>
> Is there a way to run a scrip on the condition "value of a
> certain custom field changed", or should I rather let the
> scrip run "On Transaction" and check the current field value
> against its previous value?  How to do it?
>
>    Ciao, Lobo
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100429/970c96e8/attachment.htm>


More information about the rt-users mailing list