Inside TFS
Kanban and Team Foundation Server 2012
Learn how Team Foundation Server 2012 and Kanban go together.
If you've used Microsoft Visual Studio Team Foundation Server (TFS), then you know it's designed to support any development methodology you want to follow. Want to do waterfall? Check. What to use an agile process, such as Scrum? Check. A large part of the process that you follow depends on the process used when creating the team project. And in true TFS fashion, if a process template doesn't exist for the process you want to follow, you can always create your own.
(Note: This article applies to TFS 2012 Update 2 -- both the on-premises TFS implementation and the new Team Foundation Service.)
One of the new agile development methodologies that has garnered interest over the past couple of years is Kanban. Kanban at its core is all about providing continual delivery of value without overburdening the development team. To accomplish this, Kanban uses a visual board to make it easy to see what work needs to be done, and the different states in which the work is. In conjunction with using a visual board, Kanban also uses the concept of limiting Work in Progress (WIP) -- that is, how much work can be active in any particular stage of the board.
TFS 2012 Update 1 provided a basic Kanban board, shown in Figure 1. This board can be used with any process template in TFS.
The board shows all the user stories in the product backlog of the team project. It's accessed by opening the team project in Team Web Access, selecting the View Backlog activity from the main page and then clicking the board tab.
The basic idea behind the Kanban board is that user stories are in a particular state. Each work item state is represented on the board as a vertical column, also known as a swim lane. By default, there are three swim lanes in the TFS Kanban board: Active, Resolved and Closed. For each particular swim lane, work items appear in the order of their stack rank, so higher-valued items appear near the top of the column. In Figure 1, User Story #01 has a higher stack rank than User Story #02, so it appears above User Story #02.
A second important concept is the idea of WIP. With Kanban, each swim lane is only allowed a maximum number of items. That maximum number of items can be based off a number of factors, including personnel and timelines, and usually is organizationally specific. The WIP limits for a particular swim lane can be seen in the title of the swim lane. In Figure 1, both the Active and Resolved swim lanes have a current WIP of zero and a maximum WIP of five, as shown by the 0/5 label.
When a user story is ready to move into the next state -- say, from New to Active -- drag and drop the work item from one column to the next. This will increase the WIP count for the swim lane. The work item will automatically orient itself to the correct position in the column, based off its stack rank. Figure 2 shows the Kanban board currently in use.
Look at the Active swim lane in Figure 2. It provides visual clues that the WIP limit has been violated: The title is red, as are the WIP numbers. This allows team members to easily see where things stand with the work that needs to be done. In this instance, something needs to be reallocated to remove this roadblock.
Kanban also has the concept of a cumulative flow diagram. This diagram shows the relative amount of work for each stage of the project over time. Colored areas on the diagram represent WIP for each stage. This diagram is used to help predict when all the WIP will be done, as well as help set the correct WIP limits for each stage. TFS calculates and creates this cumulative flow diagram for you automatically as work items are moved on the Kanban board. A small representation of the cumulative flow diagram can be seen above the board in Figure 2. Click the small image to open a larger version of the diagram, shown in Figure 3.
One thing that was originally missing from the TFS implementation of Kanban was the ability to customize the Kanban board. The board is supposed to represent the different states in your process, but not everyone uses Active, Resolved and Closed. With Update 2 for TFS 2012, the ability to customize the board columns was added. In Figure 2, directly above the board, you can see the Customize Columns link. This opens the Customize Columns window, shown in Figure 4.
For each of the default columns, the name of the column can be changed, as well as the WIP limit for that column. Also, the work item state is specified for this column. When a work item is moved into a particular column, its state will be changed to the value specified here. More columns (representing more steps in the process) can be added by clicking the "+" buttons, which add a new column to the board. Using the arrows located in the bottom of the columns, the columns can be moved to be in the correct order.
Kanban is becoming a strong agile process contender, and the TFS support for Kanban -- especially with the feature of customizable columns in Update 2 -- makes it easy to get started. To learn more about Kanban, take a look at David J. Anderson's book, "Kanban: Successful Evolutionary Change for Your Technology Business" (Blue Hole Press, 2010).
About the Author
Mickey Gousset spends his days as a principal consultant for Infront Consulting Group. Gousset is lead author of "Professional Application Lifecycle Management with Visual Studio 2012" (Wrox, 2012) and frequents the speaker circuit singing the praises of ALM and DevOps. He also blogs at ALM Rocks!. Gousset is one of the original Team System/ALM MVPs and has held the award since 2005.