다음을 통해 공유


Removing a TFS Work Item permanently

This came up with a customer of mine and since it gets asked so often, I thought of posting a blog post on how to do it.

CAVEATS:

First of all you should considering adding a state of “Removed” to the WIT. Once you do that you can change the state of the PBIs to Removed (or something similar). The PBI is then still in the system (you can query on them), but they don’t show up on the backlog anymore.

Often times you should never be doing this permanent “DELETE” as WITs that get created should remain traceable in the system for audit purposes and linkages.

STEPS TO DO:

Now on to removing a WIT permanently if that is what you really want. The WIT can be of any type (Product Backlog, User Story, Feature, or plain Task) – it does not matter.   I created a few WITs for deletion and noted their ID. (see below)

image

Next open up a VS (I used 2012) command prompt and run the WITADMIN destroy command as shown below.

image

Now your WITs are no longer in the TFS database. This is a permanent destruction and you should understand the consequences of doing this.

The command to do this is detailed in this MSDN article.

https://msdn.microsoft.com/en-us/library/dd236908(v=vs.120).aspx

Comments

  • Anonymous
    December 18, 2014
    My experience has been that they aren't really removed from the TFS DB.  I can't call them up through TFS queries, but they are showing up in aggregate data in reports and I can view them in SQL Server.  It was frustrating because the Excel reports don't allow you to drill down and examine the detail data, but I discovered that the phantom bugs were among those that I had 'Removed'.