Welcome to MSDN Blogs Sign in | Join | Help

Working around not being able to delete a work item type

The following question came up in the forum:  "How do I delete the custom work item type that I created?"  Tony Edwards posted the following.  One other thing that comes to my mind is to have a second server to use for experimentation before applying changes to the production server.

It is not possible in v1 [to delete work item types].  This question came up recently and Bill Essary gave the following guidance for mitigating the problem:

 Here are a few things that you can do:

 1)   Change the name of the type to something like “(Deprecated) Bug” so that users know not to use it

 2)    Add an attribute to the WIT that stops users from creating a new Work Item of that type.  If your initial workflow state is “active,” the attribute would be added to this transition

      <TRANSITION from="" to="Active" not=" "[global]\Team Foundation Valid Users">

[Update 8/21/06]  Unfortunately, work item types cannot be renamed in v1, so #1 above is incorrect.

[Update 4/17/09]  In TFS 2008, you can delete work items and work item types using the destroyWI and destroyWITD commands in tfpt.exe in Team Foundation Server Power Tools for 2008.

Published Friday, February 24, 2006 8:53 AM by buckh

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# VSTS Links - 02/27/2006

Rob Caron blogs about the Team System Friday Morning Briefings.  He also talks about Project Server and...
Monday, February 27, 2006 10:06 AM by Team System News

# re: Working around not being able to delete a work item type

I've tried the transition security and i'm sorry to say that it doesn't work. It does stop the users from saving the work item type but they can still create them.

I get the error "the field state contains a value that is not in the list of supported values" when trying to save.

is this what should happen or should it fail on the actual creation of the work item?

also adding a message like "Depricated" simply duplicates the work item type in the list of available types thus giving a separate depricated bug and a bug type.

I've found that the easiest way to kill off a work item type at present is to mark all possible fields with the <EMPTY /> attribute and upload via witimport.
Wednesday, March 15, 2006 11:23 AM by James Dykes

# re: Working around not being able to delete a work item type

That is correct.  The transition security workaround will prevent workitems of that type from being saved to the server.  It will NOT prevent the user attempting to create an item of that type in the UI.  The UI will try to create any type that is in the list of work item types for the project.  I would recommend in addition to the transition security (or other similar workaround) changing the form to be empty save perhaps a field with a defaulted value indicating that items of the type can no longer be saved.
Wednesday, March 15, 2006 12:42 PM by Tony Edwards MSFT

# re: Working around not being able to delete a work item type

Syntax correction:

<TRANSITION from="" to="Active" not="[global]\Team Foundation Valid Users">

Monday, January 05, 2009 6:15 PM by Helder

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker