- HowTo: Add a State in the definition of a WorkItem (I)
- HowTo: Add a State in the definition of a WorkItem (II)
in the previous post we saw how to add a new State to the definition of States of a WorkItem type Task to MSF for Agile5.0. In this post we will add a number of conditions to be fulfilled in the actions of state change.
A condition of business can be the following:
A Task may not pass state [Proposed] to [Active] if the hours estimated, completed, and remaining information defined in the same has not been completed.
To achieve this condition follow the following steps, from the definition of the Task that we completed in the previous post.
1 Edit the definition of a Task and access to the tab [Workflow]
2 Select the transition [Proposed > > Active], we deploy the contextual menu and select the option [Open Details]
3 Select [Fields] tab to add the fields on which we work.
4 Add a new field, select [Microsoft.VSTS.Scheduling.OriginalEstimate]
5. In the tab [Rules], add a new rule. In this case to define the field is required
6 We also add the fields [Microsoft.VSTS.Scheduling.RemainingWork], and [Microsoft.VSTS.Scheduling.CompletedWork] as required fields in the transition.
7. In the Workflow diagram we see as these fields are marked as fields of work in the transition [Proposed > > Active]
8 Save the definition of the Task on the server, chill Team Explorer and create a new task.
9 When we create the same we can see that initial state [Proposed] presents no restriction at the time to create it.
10. When the state change to [Active] see that fields of effort (hours) are marked as active, which marks the rule defined for the transition.
Greetings @ Here