TFS work item identifies a piece of work for the project. Project managers can use this facility to keep track of the work done by developers, and developers can benefit from clear, specific work, with having the flexibility integrated into their development environment. Real time status of the items helps the projects to asset the risks, and delivers the project on time.
The existing work items are:
Scenario A description of the user’s need or request.
Bug A defect or deviation between expected and observed behaviour in the product.
Quality of Service Requirement An expected deliverable of the final product. The deliverable can be an outcome, a problem solved, a feature, and so on.
Task A stand-alone action that must be accomplished by a person or group of people.
Risk A probable event or condition that can have a potentially negative outcome on the project in the future.
Instead of creating from stretch, we are going to export a work item from TFS, modify it, and import it as a new work item. At the very last part, I’ll show how to remove the work item.

Part 1: Exporting Task Work Item

To modify any of work items, you may use Power tools, VS2008 Command Prompt, and run:
witexport /f " c:\temp\task.xml" /t "xtf109" /p JLD /n Task

which stands for

f: file location
t: TFS Server Name
p: TFS Team Project Name
n: Work Item Type you want to export.

First, you may want to change value of the name of the “WORKITEMTYPE.”

The xml file has three categories:

Fields defines which fields you want to show for that work item and what kind of behaviour they are going to display. You can remove any field you do not want.
Each field may have:
– The field may ask for a VALIDUSER
– The field may let only ALLOWEDVALUES, where you may modify “LISTITEM” for the dropdown values, i.e. Severity, Issue, Triage, and Priority…
– And the field may let to select one of the values listed, but can stay as empty as well with SUGGESTEDVALUES.

There is only one exception. “State Change Date” has a default clock as WHENCHANGED property. All other fields reference this value as WHENNOTCHANGED, especially the state change fields.

Workflow defines how the states of the work items are controlled, and it is divided into two:
A. States
B. Transitions

A. States:
At States fields, the required and empty fields are identified for the states. By default, there are three flows:
1. Proposed
2. Active
3. Resolved
4. Closed
You can add new fields, change their mandatory properties.

B. Transition:
The transitions define the workflow between states. For each transition you can force the user to enter data, i.e. Assigned User, Reason for Deferring, etc.
By default, for task, there are 9 transitions allowed:
From “” to “Proposed”
from “Proposed” to “Active”
From “Active” to “Proposed”
From “Active” to “Resolved”
From “Active” to “Closed”
From “Resolved” to “Active”
From “Resolved” to “Closed”
From “Proposed” to “Closed”
From “Closed” to “Active”

The last part of xml has Form fields, which defines the layout of the form. The UI of the work item is defined here, and you can implement your own design, without any restriction. You can define all tabs, groups on a tab, type of the control [drop down or textbox], docking styles, alignments and of course their labels.

Part 2: Importing

witimport /f "c:\temp\ToDoForBackEndTeam.xml" /t "xtf109" /p "Test TFS Project"

which stands for:

f: file location
t: TFS Server Name
p: TFS Team Project Name
n: Work Item Type you want to export.

Be careful about that you can’t import the work item unless you have a brand new “WORKITEMTYPE”

Part 3: Removing work Item

The easiest part is removing the work item:

tfpt destroywitd /server:"xtf109" /project:"Test TFS Project" /workitemtype:"ToDoForEbru"


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s