Remove or delete work items

Visual Studio Team Services | Visual Studio 2015

You can remove work items added to your backlog or taskboard 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.

ActionVS Team ServicesOn-premises TFS
Remove work items by changing the Statecheckmarkcheckmark
Delete work itemscheckmark
Restore deleted work itemscheckmark
Permanently delete work itemscheckmarkcheckmark

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.

Change State to Removed

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 (Team Services)

Feature availability: The Delete and Recycle bin features are currently only available from VS Team Services.

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.

  1. You can delete a work item from within the work item form (requires that you have switched to the new work item experience).

    Delete work item from the 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.

  2. Confirm you want to actually delete the item.

    Confirm delete

  3. Using multi-select from a backlog or query results list, you can delete several work items at once.

    Delete multiple items from backlog

  4. You can also delete work items from your Kanban or task board.

    Delete work item from Kanban board

    Or, you can drag them to the Recycle bin (Recycle bin). You can only access the (Recycle bin) from the Work hub.

Restore or permanently delete work items (Team Services)

Feature availability: The Delete and Recycle bin features are currently only available from VS Team Services.

To restore deleted items, open the Recycle bin.

Open Recycle bin

Select the items you want to restore and then choose restore or to permanently delete the items.

Open Recycle bin

Confirm your selection.

Permanently delete work items (TFS)

Use the 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 VS Team Services account.

  1. 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.

  2. To delete several work items from an account hosted on VS 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

  3. 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

  4. To delete a single work item, simply enter the ID as shown:

    witadmin destroywi /collection:http://TFSServerName:8080/tfs/DefaultCollection /id:2003

Related notes

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.

You add and update work items to plan and track work.

Delete and restore actions performed under the hood (Team Services)

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.