Reputation: 1
I have created a rule that makes a field mandatory if the area ID is 12. However, the rule doesn't work. Nothing happens. If I change the condition to another case (e.g. status of a work item), it works.
My Rule:
What am I doing wrong? Can anyone help?
API Request:
Upvotes: 0
Views: 1240
Reputation: 30343
From above API request, i can see you were trying to create the rule for the root area path.
I tested and found the rule doesnot work if the the Area ID is set to id of the Root Area Path.
If you intend to set the rule for the root area path of your project. You can change the rule Conditions to Team Project = Team Project Name as workaround. See below:
If you have child area paths under the root area path and intend to create rules for the children area path. You need to get the area id of the child area path. And set the rule Conditions to Area ID = ID of ChildrenAeaPath
.(Rule for children area path works perfectly).
See below Api request to get the children area path id.
GET https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes/{structureGroup}?$depth={$depth}&api-version=5.1
Upvotes: 1
Reputation: 3
Are you by any chance trying to modify an existing rule - have you tried creating a brand new rule? I had this issue when I was trying to modify an existing rule that was disabled earlier. Even though the rule was enabled back, nothing would happen when the work item was modified.
After I created a new rule with the same condition as yours, it worked for me.
Upvotes: 0