Tuesday, May 19, 2009

TFS - Don't allow "Resolved" on checkins

This is the third or fourth time I've done this, so I thought I should put it here for the fifth or sixth time ;-) I have yet to find this away without getting dirty in the Xml (doing this in the GUI doesn't seem to work).

  1. In VS 2008, export the work item type (probably task, if you're using Agile 4.0) to an Xml file (if it asks you to include any Global Lists, just say no).
  2. Open w/ yr Xml editor (I use Notepad++)
  3. Find the TRANSITION node between the two states you care about. (Xpath would look much like "//WORKFLOW/TRANSITIONS[TRANSITION[@from='Active' and @to='Closed']])
  4. Under this node, you'll find an ACTIONS/ACTION node containing a value like "Microsoft.VSTS.Actions.Checkin".
  5. Delete that entire "ACTIONS" node.
  6. Save the file.
  7. Import the work item definition back into TFS, effectively overwriting the existing definition.
  8. Profit!
Note: As always, I googled to see if someone had figured out the GUI angle. Lo and behold, Martin Woodward has blogged about this before, bless his heart. Due credit goes here:

http://www.woodwardweb.com/vsts/000230.html

No comments: