[rt-users] COndition on customfield change

Benjamin Weser weser at osp-dd.de
Fri Feb 8 08:52:41 EST 2008


Alvara,

have a look at http://wiki.bestpractical.com/view/Contributions, there 
are several examples how to read and manipulate the values of CFs via 
scrips.
First you have to look if the transaction was caused by a CF, something 
like this:

unless (
 ( $self->TransactionObj->Type eq "CustomField"
   &&  $self->TransactionObj->Field == 6 )
 ||  $self->TransactionObj->Type eq "Create"
 ) {
   return 0;
}

Hint: The "6" equals the id of the CF.

Then you can test for OldValue and NewValue. Have a look at the examples 
mentioned above.

Best,
Ben


Munoz, Alvaro schrieb:
> Hi there,
>  
> Is there any way to match a customfiled value change from one specific 
> value to another?
>  
> Transactions of type "CustomField" leave NewValue and OldValue to NULL 
> so I just can know that the field has changed but not the old and new 
> values.
> In the ticket history you can see both values, can i use those values 
> from a scrip condition?
>  
> Thanks in advance!
>  
> Alvaro
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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




More information about the rt-users mailing list