Ravendra's Blog

June 2, 2010

How To Permanently delete work item: TFS 2010 / 2008

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:23 pm

In order to delete/ destroy work items or work item types, you’ll need TFS 2008/2010 and you’ll need the respective version of Power Tools.

There are two commands:

DestroyWI: You can use this to destroy one or more work items.

DestroyWITD: You can use this to destroy an entire work item type — this means, you are destroying every work item of that type and the type itself.

Please note: Destroy means that you are permanently removing all trace of this work item/work item type from the operational store.  The work item data will still remain in the reporting warehouse.

In TFS 2008 you need to use TFS power tool commands (i.e. tfpt)

C:\Program Files\Microsoft Team Foundation Server 2008 Power Tools>tfpt destroywi /?

tfpt destroywi – Destroy one or more work items

Destroys a work item or work items. Currently, work items can only be destroyed. Destroying a work item means the work items is physically deleted and cannot be restored. The system does not support logical (and thus recoverable) deletion of work items.

Destroyed work items will remain in the data warehouse.

Usage: tfpt destroywi /server:tfsservername /workitemid:value1[,value2,…] [/noprompt]

/server Required. TFS server.

/workitemid Required. IDs of work items to destroy.

/noprompt If specified, does not ask for confirmation before destroying.

 

While In TFS 2010 you need to use witadmin commands

C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools>witadmin destroywi /?

Work Item Tracking Administration tool. (C) Copyright 2006 Microsoft Corporation. All rights reserved.

Destroys a work item or work items. Currently, work items can only be destroyed. Destroying a work item means the work item is physically deleted and cannot be restored. The system does not support logical (and thus recoverable) deletion of work items.

Usage: witadmin destroywi /collection:collectionurl /id:id [/noprompt]

/collection Specifies the Team Foundation project collection. Use a fully specified URL such as http://servername:8080/tfs/Collection0.

/id Specifies the ID of the work item to destroy. Supports multiple IDs delimited by commas such as 12,15,23 (with no whitespace).

/noprompt Turns off the confirmation message.

Advertisements

2 Comments »

  1. I know this thread is old but i came across a tool that i thought i should share.

    If you are still doing work item delete via command line here is a tool that worked for me.

    http://witadminui.codeplex.com/

    Thanks

    Sid

    Comment by sid — March 28, 2012 @ 7:43 pm | Reply

  2. HI,

    For TFS 2010 there is a TFS Extension that allows Work items deletion from Visual Studio. Just select the work items you need to delete and in context menu select Delete work items.

    You find this extension, TEK workitem published in Visual Studio Gallery:
    http://visualstudiogallery.msdn.microsoft.com/1397f185-7f49-49c8-ad80-e45fc9dbbfe9

    Regards

    ezien

    Comment by ezien — May 24, 2012 @ 9:34 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: