Ask a questionAsk a question
 

AnswerPermanently Delete Work Items?

  • Thursday, November 17, 2005 3:03 PMkevg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi, I'm running TFS Beta 2 and VS 2005 Beta 2. I was wondering if there is any way to permanently delete work items? Not just to mark them as Closed, but completely get rid of them? I have full access to the server. Is there a safe way to go into SQL Server and delete items from the database, or are there command lines tools to perform this?

    Thanks,
    Kevin

Answers

  • Thursday, November 17, 2005 10:41 PMMareen Philip Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Kevin,

       Unfortunately, the only way to permanently remove workitems is to delete the project that contains them. Typically, we recommend creating test workitems on a test project that can then be deleted.

    Thanks.
    -Mareen.

All Replies

  • Thursday, November 17, 2005 10:41 PMMareen Philip Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Kevin,

       Unfortunately, the only way to permanently remove workitems is to delete the project that contains them. Typically, we recommend creating test workitems on a test project that can then be deleted.

    Thanks.
    -Mareen.
  • Tuesday, October 10, 2006 1:56 PMOlliH Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    There is now a tool in codeplex for this, called TFS Power Pack:

  • KillBill - Stops a Team Build currently running on a build server.
  • WorkItem Terminator - Permanently deletes a work item from the TFS database.
  • http://www.codeplex.com/Wiki/View.aspx?ProjectName=TfsPowerPack

    regards

    Oliver

  • Monday, May 14, 2007 7:51 PMseercase Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    We had the same problem and where able to delete them via this SQL statement.

     

    Make sure you set the DELID (1729) to the Work Item ID that you want to delete.

    Tread Lightly.... I am no expert but it seams to work for us.

     

     

    Declare @DELID int
      set @DELID = 1729

     

    DELETE FROM [TfsWorkItemTracking].[dbo].[WorkItemLongTexts]
          WHERE ID = @DELID

    DELETE FROM [TfsWorkItemTracking].[dbo].[WorkItemsAre]
          WHERE ID = @DELID

    DELETE FROM [TfsWorkItemTracking].[dbo].[WorkItemsWere]
          WHERE ID = @DELID

    DELETE FROM [TfsWorkItemTracking].[dbo].[WorkItemsLatest]
          WHERE ID = @DELID

     

    Charlie