VSTS has very highly customizable structure, every team project has a process (default Scrum or Agile) which can be changed. Especially if you have multiple projects with different requirements on project management wants to have different fields in their work items it might be a good idea to create a process for those team projects.
This new process will open the door to customize your work items for the projects need. you can add new work item types, States, customize the layout by adding groups or pages, you can add new fields,
all good and well but generally those requirements never ends with just adding some fields. Some fields will be required base on the state of some other field and some fields values need to be automatically calculated.
Work Item Rules help us to create all those rules/calculations
Conditions are : (not all make sense when you planned to use as the first condition, but you combine them
like: if No value is defined for Assigned To And A work item state is Closed
You can have max 2 Conditions per Rule
- A work item state changes to …
- A work item state changes to …
- A work item state is not changed …
- A work item state changes from …
- A work item state is …
- A work item state is not …
- The value of … (equals)
- The value of … (not equals)
- A value is defined for …
- No value is defined for …
- A change was made to the value of …
- No change was made to the value of …
- current user is member of group …
- current user is not member of group …
And Actions Are:
like: Make required TestId
You can have max 10 Actions per Rule
- Clear the value of …
- Copy the value from …
- Make read-only …
- Make required …
- Set the value of …
- Use the current time to set the value of …
- Use the current user to set the value of …
Last note, if you like to automate things even the Rules, you can use the REST API to do that too.
for more details :
https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/rules?view=azure-devops-rest-5.1