Change field value in change state value


I've never worked with JavaScript and any programming language but I need for my workflow in function which will be able to change field value when change state of task. For example, when I transition task from column "On Submit" to columns "In Progress" or "To Do" I want to change the field "Iteration" on next value: 1 > 2 > 3 and go on every time.  

Could help me, anybody? Thank you.

1 comment
Comment actions Permalink
Official comment


We're very sorry, we've missed your post due to a technical issue with the forum.

I suggest you use the issue.isChanged method in the guard section for checking when the issue's state is changed. Then, you can change the Iteration field in the action section. Please take a look at the default Stop timer when issue is fixed workflow that illustrates how to process the State changing. 

See also - JavaScript Workflow Quick Start Guide  

Should you have any further questions, feel free to contact us.

Please sign in to leave a comment.