Home > Mobile >  How to automaticly change Work Item State
How to automaticly change Work Item State

Time:01-14

I want to create rule like: When custom field value is set to X then change state od Task to New. Can it be done?

It's hard to belive this isn't possible but I can't find a way to do it.

CodePudding user response:

Default custom rule does not support changing state. There are two workarounds you can refer to.

Workaround1:

You can customize a field to decide whether to change the state, trigger a webhook when the field changes, and then trigger a pipeline through this webhook. In the pipeline, the state of the current work item is changed by running the REST API enter image description here

  1. Follow this doc enter image description here

Set Trigger on this type of event to Work item updated, set Field to the customed field created at the first step.

  1. Set the webhook created at the second step as the pipeline resource and run the REST API enter image description here

  2. Set Triggers as following: enter image description here

When the value of the field "Test" changes to "X", the state will change to "New". enter image description here

enter image description here

  • Related