sifisofruits2.gif

Introduction

I was recently asked by the training coordinator in my organisation to prepare and present training material for Team Foundation Server 2012. Team Foundation Server is currently my new found interest and as you could imagine, I couldn't turn down such a request. One of the great things with Team Foundation Server is the sample stuff that comes with it such as the rdl report files, work item queries and themes that comes with process templates. However, unlike adventureworks database that can be used in SQL Server, we currently don't have sample data for Team Foundation Server. Sample data is required to play around with sample reports, work item queries, team favourites dashboard in Team Web Access etc.

Therefore, part of creating the training I also setup some sample data that I have decided to share with everyone here at CodePlex. The data that I have prepared contains sample work items and should get you started on either preparing a Team Foundation Server 2012 Training Material or Proof of Concept on Team Foundation Server for a prospective client.

Sample Case Study: Sifiso's Fruits

The work items are for an artificial Sifiso's Fruits business. Sifiso's Fruits is a fruit store that sells all kinds of fruits. Sifiso's Fruits has recently identified the need to setup a mobile-technology presence by making their fruit products available for purchases through Windows Phone 8 platform.

Thus the Product Backlog, Requirement, or User Story (depending on your Agile methodology/Process Template) is to create a Windows Phone 8 App that will be used to sell Sifiso's Fruits.

Steps

Download the source files.

There should be a total of 6 files comprising of 3 Microsoft Excel Files and another 3 Microsoft Project Files.

The files name should indicate the intended process template that will be populated from the sample work item. For example, file name TFS2012SampleWorkItemsSCRUMv20.xlsx contains sample work items that can be used in a team project with a Visual Studio SCRUM 2.0 Process Template.

Step 1

Open the files i.e. file name TFS2012SampleWorkItemsSCRUMv20.xlsx. The Microsoft Office Project and Excel files contains the same data. I have included both file types for your convenience. If you prefer creating Team Foundation Server Work Items using Microsoft Project then you can use the file of MS project type.

For the purposes of this guide, file name TFS2012SampleWorkItemsSCRUMv20.xlsx will be used.

Step 2

Open another instance of Microsoft Office Excel.

Step 3

Navigate to the Team menu tab as shown below. (Please note that you will only be able to see the Team menu tab provided you have installed Visual Studio Team Explorer)

team.PNG

Step 4

Click on the New List tab which should launch Connect to Team Foundstion Server Wizard.

Select a Team Foundation Server.

Select Team Project Collections.

Select Team Projects - for the purposes of this guide, this should be a team project that is based on the SCRUM 2.0 Process Template

Click Connect

new_list.PNG

tfs_wizard.PNG

Step 5

The actions you performed in the preceding step should lead to the opening of the New List wizard.

Select the Input list option to enter new work items and click Ok

inout_list.PNG

Open another instance of Microsoft Office Excel.

Step 6

Go back to the TFS2012SampleWorkItemsSCRUMv20.xlsx document.

In the Title column, select and copy all the rows. Go back to your other spreadsheet and paste the data in there.

Immediately after you have pasted the data you should notice the a warning icon in the Work Item Type column - as shown below. This indicate a missing value - which means the work item type column should be assigned a value.

titles.PNG

Use the TFS2012SampleWorkItemsSCRUMv20.xlsx document to assign values to the work item type per corresponding title.

When you done, click publish.

publish.PNG

When the work items have been successfully published, you shold have all cells underneath the ID column populated as shown below:

ids.PNG

Congratulations, you have now captured and uploaded your sample work items.

But wait, we are not done. If you look at the TFS2012SampleWorkItemsSCRUMv20.xlsx document, you will notice that highlights have been used to indicate the product backlog item that the work items such as task, impediment, bugs, and test case belong.

The easier way of establishing this relationship is via bulk editing which is available in Team Web Access.

Thus,

Step 7

Log onto your Team Web Access that contains the Team project we have just populated with sample work items.

Step 8

Click on Work menu - Queries sub-menu - New query.

Design your query as shown below:

new_query.PNG

Step 9

Save and then Run the query

You should then see all the work items including the our sample work items.

Let's edit the column options and include a Related Link Count column. This column should give us an indication of number work items that a given work item is linked to. At the moment the values under Related Link Count column for our sample work items should be zero.

related.PNG
relatedcount.PNG

Step 10

Go back to the spreadsheet you used to popolate your team project. Look for an id of Product Backlog Item (PBI) called Register Phone Development. In my example, the ID is 268.

registerPBI.PNG

Go back to you query in Team Web Access and highlight all tasks that should be associated to PBI 268.
In my example, these are IDs 269, 270, and 271.

childrenofpbi.PNG

While the tasks are still highlighted, right click and choose link to an existing item option:

linkitems.PNG

An ADD LINK TO MULTIPLE ITEMS dialog should open.

Ensure that the Link Type is of Parent.

Enter Work Item ID of your Register Phone Development PBI. In my example, it's ID 268.

Click OK

linkitemsdialogue.PNG

The values in the Related Link Count columns for all items you have linked to the PBI should change from zero to 1.

You can do the same for the other two PBIs.

Conclusion

I hope this sample data should get you started in playing with work items in Team Foundation Server 2012. Your reports should be able to show some data too. You may need to play around with the status of the sample work items so that you have some variety in your reports data/Team Favourites view.



Last edited Jun 28, 2013 at 3:17 PM by mafiswana, version 7

Comments

qgcl786 Nov 29, 2014 at 9:39 PM 
Thanks for the great article. I have followed your instructions however I am stuck at Step 4 as can't see exactly as shown in your screenshot. I noticed your excel file is read-only so I cannot change team server details etc. Please can you comment on this and let me know how can I get editable version of your files to proceed as currently it is trying to connect to your server not mines.