Lots of companies use different portfolios to categorize and define/understand the scope of work. The default TFS Scrum template contains a Feature, Product Backlog item portfolio. Today, we are going to create a level, Epic, which is above Feature. TFS supports up to seven different portfolio levels.
We aren't going to focus on what fields are available for the new Epic Work Item Type, but rather what is required to add it to our TFS process template.
The first step is to create a copy of the existing Feature.xml
in the TypeDefinitions
folder (C:\ProcessTemplates\Microsoft Visual Studio Scrum 2013\WorkItem Tracking\TypeDefinitions
) and name it Epic.xml
. Open the Epic.xml
file in your favorite editor. Then locate and change the name attribute on the WORKITEMTYPE
node to Epic
.
Now, open the ProcessConfiguration.xml
file that is located in C:\ProcessTemplates\Microsoft Visual Studio Scrum 2013\WorkItem Tracking\Process
. In the PortfolioBacklogs
node, add the .xml
shown as follows:
<PortfolioBacklog category="Microsoft.EpicCategory" pluralName="Epics" singularName="Epic"> <States> <State value="New" type="Proposed" /> <State value="In Progress" type="InProgress" /> <State value="Done" type="Complete" /> </States> <Columns> <Column refname="System.WorkItemType" width="100" /> <Column refname="System.Title" width="400" /> <Column refname="System.State" width="100" /> <Column refname="Microsoft.VSTS.Common.BusinessValue" width="50" /> <Column refname="System.Tags" width="200" /> </Columns> <AddPanel> <Fields> <Field refname="System.Title" /> </Fields> </AddPanel> </PortfolioBacklog>
Tip
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
This XML blurb is the same as the default Features, but with a small change on the first line. We are specifying that this is the Microsoft.EpicCategory
category, and we changed the plural and singular names for the work item type to Epics
and Epic
. You will also need to add the attribute parent="Microsoft.EpicCategory"
to the Feature
portfolio to state that the new Epic
category is the parent of Feature
.
You will also need to find the WorkItemColors
node and add the following node to specify the color to be used for the Epic work item type.
<WorkItemColor primary="FFFF5900" secondary="FFFFA200" name="Epic" />
This line simply specifies the primary and secondary colors to be used when displaying this work item on the boards and in grids. This helps users of TFS to easily identify a work item by its color, instead of looking for its work item type in the text.
Next, open the Categories.xml
file that is in C:\ProcessTemplates\Microsoft Visual Studio Scrum 2013\WorkItem Tracking
, and add the following XML under the cat:CATEGORIES
node:
<CATEGORY name="Epic Category" refname="Microsoft.EpicCategory"> <DEFAULTWORKITEMTYPE name="Epic" /> </CATEGORY>
This will let TFS know that there is an Epic
category available and the default work item type for the Epic
category is our new Epic
work item type.
Importing a new work item or changes made to a work item category will require you to import three files (the ones we just edited). You can accomplish this by opening the Developer Command Prompt for VS2013 and importing the files as discussed in the following sections.
Importing WITD is the same as what we did earlier. This is a regular import of the WITD using the witadmin
tool.
cd C:\ProcessTemplates\Microsoft Visual Studio Scrum 2013\WorkItem Tracking\TypeDefinitions witadmin importwitd /collection:http://localhost:8080/tfs /p:Demo /f:Epic.xml
Your new Epic
work item type now exists in TFS.
We can use the importcategories
tool to import categories. This is shown as follows:
cd C:\ProcessTemplates\Microsoft Visual Studio Scrum 2013\WorkItem Tracking witadmin importcategories /collection:http://localhost:8080/tfs /p:Demo /f:Categories.xml
We can use the importprocessconfig
tool to import the process configuration files as follows:
cd C:\ProcessTemplates\Microsoft Visual Studio Scrum 2013\WorkItem Tracking\Process witadmin importprocessconfig /collection:http://localhost:8080/tfs /p:Demo /f:ProcessConfiguration.xml
This will import all the process template configuration files into TFS.