Why isn't delete Work Item a button or menu option
-
Thursday, July 15, 2010 10:08 AM
I have been in IT for 31 years. I know the rule of data entry is the user (if authorized) may add, change, delete any data. In Work Items, the user may add, change, but not delete. Unless there's some arcane reason, I would very much like to see a delete button.
All Replies
-
Thursday, July 15, 2010 10:20 AM
Hi,
TFS doesn't contain a Work Item delete button as it does not support recoverable deletion of work items. TFS Work Items can be only be Destroyed using Witadmin CommandLine utility.
Usage: witadmin destroywi /collection:collectionurl /id:id [/noprompt]
witadmin destroywi /Collection:http:\\TestTFSServer:8080\tfs\DefaultCollection /id:12
- Marked As Answer by YiChun ChenModerator Thursday, July 22, 2010 2:31 AM
-
Friday, July 16, 2010 3:43 AMModerator
Hi David,
For your concern, it looks like that you want to remove work items that are no longer required via Team Explorer.
As Jehan33 mentioned, in Team Explorer IDE, there is no option for us to delete the existing work items. We need to apply command line tool to help us.
In TFS 2008, you need to install Visual Studio Team System 2008 Team Foundation Server Power Tools and use following command:
tfpt destroywi /server:tfsservername /workitemid:value1[,value2,...] [/noprompt]
For more information, please see: http://msdn.microsoft.com/en-gb/vstudio/cc700982.aspx
While in TFS 2010, you can use the command below:
witadmin destroywi /collection:collectionurl /id:id [/noprompt]
For more information, please see: http://msdn.microsoft.com/en-us/library/dd236908.aspx
Hope this helps! If you have any concern, please feel free to let me know.
Best regards,
Yichun Chen
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer by YiChun ChenModerator Thursday, July 22, 2010 2:31 AM
-
Monday, July 19, 2010 10:12 AMModeratorHi David,
I'm writing to follow up the post.
Please feel free to let me know if you need any help.
Best regards,
Yichun Chen
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Thursday, July 22, 2010 2:31 AMModeratorHi David,
I've marked Jehan33's and my reply as answer. If you have any concern, please feel free to let me know.
Have a nice week!
Best regards,
Yichun Chen
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Thursday, January 19, 2012 12:28 PM
Hi, guys!
There is a problem however with using witadmin - it does not destroy attachments (which tennd to take up most of the spece in tfe DB) to identify orphaned attachments in TFS 2010 (in 2008 it is different a bit) you can use the following SQL query on a project collection DB:
SELECT a.* FROM Attachments a LEFT JOIN WorkItemFiles wif ON a.FileGuid = wif.FilePath WHERE WIF.FilePath IS NULL

