Question

As soon as an iteration (Sprint) is over, we need to lock it so that nobody is able to check-in into that iteration anymore (unless they override the check-in warnings of course).

How can I achieve this? I took a look at the Team Foundation Server SDK namespace (Microsoft.TeamFoundation) but found nothing so far.

Was it helpful?

Solution 4

Here's the solution I kept:

http://intellitect.com/transitioning-between-sprintsiterations-with-tfs/

In short, you use Iteration Paths to determine the current sprint.

Then you create a query that returns all work items under the current iteration (which identifies your current sprint).

You use a Work Item Query Policy to ensure that all work items associated with the check-in are part of the result of the query (and thus part of the current iteration/sprint).

OTHER TIPS

An interation (Sprint) is usually used as Iteration Path in Work Items. But from the context of your question I suggest you have a folder in Source Control for each iteration, right?

  • Right click on the folder and "Advanced-> Security ..."
  • WebAccess open
  • Remove "Check Out" and "Check In" for all groups

Now none of your developers is allowed to check in anything in that folder and subfolders too.

This is a high level idea...

Create a Global List that you use to indicate a project and its "Current Iteration". (TFS has no concept of "Current Iteration" so you have to store it off somewhere.) After every iteration, you will have to update this list to remove the old iteration and add then new one.

Then you create a custom check-in policy that requires a Work Item Association for the check-in.

If it does have a work item association then then you check all of them (you can associate more than one) to make sure that the iteration matches the "Current Iteration" stored in the global list.

From my understanding of the TFS Client API all of these data points should be available. (The only one I am not 100% sure on is getting the associated Work Items in the check-in policy. But I would be very surprised if it is not there.)

You can also consider using the Work Item Association Policy found in the TFS Plugin Suite.

https://tfspluginsuite.codeplex.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top