Wednesday, March 11, 2009

How do you “close” a TFS Iteration? You can’t, but you can hack it to fake it… (and as a bonus, how to keep the root Iteration from being selected)

Teams WIT Tools - Work Item rules workaround: Closing down an iteration

“… Let’s take a look at another question: “How do I close an iteration so that no one can log new items against it?

image_6

For this example, let’s say we have completed Iteration 0 and don’t want users to log work items against this iteration. We also don’t want to allow work items against the root iteration path.

Since there is no direct way to enforce rules against iteration path, here’s how we can work around it:

  1. Create an IterationPathValidation field
  2. Create a tab on the work item form called “Validation Errors”, like the previous example on area path validation, and display the IterationPathValidation field
  3. Find the IDs for the restricted iteration paths
  4. Add the following rules to the IterationPathValidation field:

…”

Of the two suggestions here, how to keep a specific iteration from being selected and keeping the root from being selected, the second seems to be the most viable (and one I’m going to use right away).

The “closing” of an Iteration is very cool, but SO manual that I don’t see how viable it really is. I wonder if it could be tweaked to be a little more dynamic? Could a Closed iteration branch be created, old/closed iterations moved there and then the fact that the IterationPath contains \Closed\ be used in the validation? Will have to think about that, because I would really like to be able to “close” old iterations/Sprints but not have to tweak the validation every 30’ish days…

No comments: