Require to apply the custom advisor only on the change to the particular field
![](http://jazz.net/_images/myphoto/f21ced9056483feeeba0596de6929bdc.jpg)
Hi
I have written a custom advisor that will set the date based on the state change,
For example, In a defect, when the status is 'In Progress' and when an enumeration value is Coding, my script should set the new value to the date field that i have in the workitem
When the date field is null, then it means that it is the first time the field should be updated and i pass the value of date to it. When the date field is already populated, I'm passing the date value to update it. The problem that i find here is that, whenever something else changes in the workitem, it satisfies the condition of the state value matching and the enumeration matching and updates the date. But i want the date to be updated only when there is a change to the enumeration value.
Can you help me on how to identify the change to the specific enumeration value to use the javascript script to apply the calculated value ?