In my previous posts I talked about high level project management, and detailed iteration planning. Both created work items, mainly user stories with child task work items. How does this work in Visual Studio? And what about MS Project?
Visual Studio and hierarchical work items
Let’s start with Visual Studio. Open your team project and expand the Team Queries, then Workbook Queries:
You’ll notice that for each iteration VSTS creates an iteration backlog query, showing you the work items for the iteration. Pay attention to the icon: this means that this is a hierarchical query which will use indentation to show the parent child relation.
Execute one of the iteration backlog queries. You should get a list user stories:
Notice the + sign before the user story title: with this you can expand the the child tasks. In the toolbar you can also see an + and – icon. These will expand/contract all user stories with their children:
Should you see a task assigned to the wrong user story, you can simple drag it to the correct one, and Visual Studio will automatically move it, and indicate your changes using bold. Here I’ve moved tasks #48 to user story #11:
You can also use the green arrows in the toolbar to change the level of a work item, for example to make it a child work item. Be careful: this only works if your work items is below a user story. Otherwise drag it to the parent like before.
You can also directly create a child work item by right-clicking on a work item and adding a New Linked Work Item.
Linking to other work items has been greatly extended. You can now choose from a variety of links:
Note the predecessor link. We will revisit this when we look at MS Project and TFS.
Scheduling tasks with MS Project
When using MS Project with TFS 2008, dependencies added with MS Project would not be saved back to TFS. With TFS 2010 you can now easily plan tasks in project using Gantt charts, add dependencies and publish back to TFS without losing these dependencies.
Start MS Project using the “Open in Microsoft XXX” feature in Visual Studio:
Let’s say you have two tasks:
Now you want to indicate that the first task assigned to April must be done before April can start the second task. Do to this Alt-drag the first task to the second task to create a predecessor relation. Your Gantt chart should now look like this:
Note the Predecessors column which contains the row number of the first task. This is not the work item id, it is the number of the row in Project.
Now you can publish this back to TFS. After that, go back to Visual Studio and open the first work item. Go to the links tab. You should now see a successor link to the next task: