Monday, April 27, 2009

Delete WorkItem from TFS database

To delete workitem added by mistake, you have to delete every thing related to it, so you can go to the TFS database and run the following

Declare @DeleteThisID int set @DeleteThisID = 10000

DELETE FROM [WorkItemLongTexts] WHERE ID = @DeleteThisID
DELETE FROM [WorkItemsAre] WHERE ID = @DeleteThisID
DELETE FROM [WorkItemsWere] WHERE ID = @DeleteThisID
DELETE FROM [WorkItemsLatest] WHERE ID = @DeleteThisID

No comments: