Move, change, or delete work items
Team Services | TFS 2015
Often times you find that someone created a work item of the wrong work item type (WIT) or within an incorrect team project. You can correct these issues for individual work items or bulk modify several work items. You can also remove work items added to your backlog or task board that aren't relevant anymore.
Depending on whether you work in the cloud in Visual Studio Team Services or an on-premises Team Foundation Server (TFS), you have these options for removing or deleting work items.
Feature availability: Some features are only available from the cloud service or from a version of an on-premises deployment. These are annotated as follows:
- Team Services - Visual Studio Team Services only (cloud service)
- TFS - Team Foundation Server only (on-premises)
You only have access to those actions that are supported on your platform and for which you have permissions.
|Action||Team Services||TFS 2015||TFS 2015.1||TFS 2015.2||Required permissions|
|Change work item type 1, 2||Contributor|
|Move work item to another team project 1, 2, 3||Project Administrator|
|Remove work items by changing the State 2, 4||Contributor|
|Delete work items 1, 2||Contributor|
|Restore or permanently delete work items 1, 2||Project Administrator|
|Permanently delete work items 5||Project Administrator|
- You can't perform change, move, delete, or restore actions on WITs associated with testing or that belong to the Hidden Types Category. This includes all work items that track tests--such as test cases, shared steps, and shared parameters--code review requests and responses, and feedback requests and responses.
Tip: Use TFS Team Project Manager, a free client from CodePlex to quickly determine which WITs belong to the Hidden Types Category.
- You can also perform a bulk modify to change type, move, modify state, restore, or delete work items.
- You must be a member of the Project Administrators group or be granted explicit permissions to move work items.
- Changing the State to Remove causes work items to be removed from a backlog or board view (product, portfolio, and sprint backlogs, Kanban board, and task boards).
- To delete work items, you must be a member of the Project Administrators group or be granted explicit permissions to delete or restore work items.
Change the work item type
Feature availability: Change work item type is currently support only from the web portal for Team Services.
Changing the work item type refreshes the work item form with the fields defined for the type selected.
Select the Change type... option from the work item form's Actions menu.
Select the type and optionally enter a comment.
Comments are automatically added to the Discussion control.
Save the work item to complete the change.
Note: The system automatically resets the State and Reason fields to the default initial values of the specified type.
Tip: When you connect to TFS, you can’t change the work item type for an existing work item, but you can copy the work item and specify a new type. Also, if you have several work items with type changes you want to make, you canexport them using Excel, and then re-add them as a new type.
Move a work item to another team project
Feature availability: Move work item is currently support only from the web portal for Team Services.
When you discover that a work item belongs to a different team project within your account or collection, you can move it where it belongs.
Choose the Move... option from the work item form's Actions menu.
If you don't see the option, then you haven't been granted permissions to Move work items out of the project.
Select the destination team project and optionally enter a comment.
Comments are automatically added to the Discussion control and an entry is made to the History control. Also, the system automatically resets the State and Reason fields to the default initial values for the work item type that you move.
Remove work items by changing the State
By changing the State of a work item to Removed, you effectively remove it from all backlogs and boards.
To cause removed items to not show up in queries, you must add a clause that indicates which states you want the query to filter for.
Delete work items
Feature availability: The Delete and Recycle bin features are currently only available from the web portal for Team Services and from team projects that connect to an application-tier server installed with TFS 2015 Update 2 or later version.
Deleted work items won't appear in your backlogs, boards, or queries. Deleted items are moved to a recycle bin from which you can recover them if needed.
You can delete a work item from within the work item form.
To delete work items, you must be a member of the Project Administrators group or have the Delete work items in this project set to Allow.
Confirm you want to actually delete the item.
Using multi-select from a backlog or query results list, you can delete several work items at once.
You can also delete work items from your Kanban or task board.
Or, you can drag them to the (Recycle bin). You can only access the (Recycle bin) from the Work hub.
Restore or permanently delete work items
Feature availability: The Delete and Recycle bin features are currently only available from Team Services and from team projects that connect to an application-tier server installed with TFS 2015 Update 2 or later version.
To restore deleted items, open the Recycle bin.
Select the items you want to restore and then choose restore or to permanently delete the items.
Note you'll only see the Permanently delete option only if your Permanently delete work items permission is set to Allow.
Confirm your selection.
Permanently delete work items
witadmin destroywi command to permanently remove work items from the data store. A permanent delete means all information in the WIT data store is deleted and cannot be restored nor reactivated.
You can run
witadmin destroywi against an on-premises TFS server or Team Services account.
Open a Command Prompt window where the latest version of Visual Studio is installed and enter:
cd %programfiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE
On a 32-bit edition of Windows, replace %programfiles(x86)% with %programfiles%.
The witadmin command-line tool installs with any version of Visual Studio. You can access this tool by installing the free version of Visual Studio Community.
To delete several work items from an account hosted on Team Services, enter the following specifying the account name and separating the IDs with commas.
witadmin destroywi /collection:http://AccountName/DefaultCollection /id:12,15,23
To delete several work items from an on-premises collection, enter the server name and directory path to the collection. For example:
witadmin destroywi /collection:http://TFSServerName:8080/tfs/DefaultCollection /id:12,15,23
To delete a single work item, simply enter the ID as shown:
witadmin destroywi /collection:http://TFSServerName:8080/tfs/DefaultCollection /id:2003
For Team Services and TFS 2015 Update 2 You must have Permanently delete work items permission set to Allow.
Required permissions: For Team Services and TFS 2015 Update 2 or later versions, you must have Permanently delete work items permission set to Allow. For TFS 2015 Update 1 or earlier versions, you must be a member of the Project Administrators group of have Edit project-level information permissions set to Allow.
Each work item represents an object stored in the work item data store. Each work item is assigned a unique identifier, an ID, which is unique within an account or project collection.
To learn more about tracking work, see:
- Add and update work items: Team Services | TFS
- Link work items
- Email work items and share work plans
- Bulk modify or delete work items
- Copy or clone work items
- Drive Git development (Team Services)
- Use queries to list work items
- Pre-populate work items using work item templates
- Customize work item: Team Services | TFS
By default, Project Administrators and Contributors can change the work item type and delete work items by moving them to the Recycle bin. Project admins can grant permissions to other team members as needed.
For example, as a project admin you can grant a user, team group, or other group you've created to have these permissions.
Open the Security page for the team project and choose the user or group you want to grant permissions.
In this example, we grant the Team Admins group permissions to move work items to another team project and to permanently delete work items.
For more information about setting permissions, see Restrict access.
Delete and restore actions performed under the hood
Delete work items
When you delete a work item, the following actions occur:
- Generates a new revision of the work item
- Updates the Changed By/Changed Date fields to support traceability
- Preserves the work item completely, including all field assignments, attachments, tags, and links
- Causes work item to become non-queryable and therefore can't appear in any work tracking experience, query result, or report
- Updates charts accordingly, CFD, velocity, burndown and lightweight charts are updated to remove deleted work items
- Removes WIT extensions
- Preserves trend data except for the latest value
- Removes the work item from the data warehouse/cube similar to as if it was permanently removed.
Restore work items
When you restore a work item, the following actions occur:
- Causes a new revision of the work item to be made
- Updates the Changed By/Changed Date fields to support traceability
- Becomes queryable
- All fields remain unchanged
- History contains 2 new revisions, one for deletion, and one for restore
- Reattaches WIT extensions
- Updates charts accordingly, CFD, velocity, burndown and lightweight charts are updated to include the restored work items
- Restores trend data
- Adds the work item back to the data warehouse/cube similar
- Sets the area or iteration path fields to the root node if the previous area path or iteration paths were deleted.