It's all about the answers!

Ask a question

Can you prevent a Parent work item from "outrunning" it's children?

Ken Creager (6542220) | asked Nov 21 '12, 12:45 a.m.
When you create children work items, is there a way to prevent the parent work item from getting into a STATE further along in the workflow than it's children?  For example, I don't want a parent DEFECT to get to Resolved State if there is a child TASK in In-Progress State, or similar?


Accepted answer

permanent link
Lauren Hayward Schaefer (3.3k11527) | answered Nov 21 '12, 7:08 a.m.
Hi Ken,

There is a built-in precondition you can use that "Requires that a work item can only be resolved if all of its children are resolved."  To use this precondition,
  1. Open the Team Artifacts view in your Eclipse client
  2. Right-click on your project area and select Open
  3. Click on the Process Configuration tab
  4. In the Configuration section, expand Team Configuration
  5. Select Operation Behavior
  6. In the Operation Behavior table, in the Work Items section, in the Save Work Item (server) row, click on the Everyone cell
  7. In the Preconditions section, click Add
  8. Select All Children Resolved and click OK
  9. Save your changes

If you want something more specific, you can write your own custom precondition. has more information on how to do this.

Ken Creager selected this answer as the correct answer

2 other answers

permanent link
Ralph Schoon (62.7k33643) | answered Nov 21 '12, 7:18 a.m.
edited Nov 21 '12, 7:18 a.m.
To add to Lauren's answer, you could create an advisor/precondition that checks the parent and prevents a state change based on the child states. See on how to get to the parent (or to the children, which is the reverse) and for how an advisor would look like. Running is the best entry point to get started with development of such code. Please be aware that it is not trivial and you really have to follow the workshop in the details, otherwise you will likely struggle.

permanent link
sam detweiler (12.5k6194201) | answered Nov 21 '12, 7:54 a.m.
edited Nov 21 '12, 8:52 a.m.
If you want to do this for parent child, then you can use the supplied Pre-condition as noted above, you have to enable it..

if you also want to do this for Depends On/Blocks links, that is NOT provided, but I posted the source for this pre-condition here

Your answer

Register or to post your answer.