Alexander Vanwynsberghe

"There is nothing impossible to him who will try"

Implementing Kanban with TFS: Under the hood

In a previous post, I talked about the Kanban 1.0 process template made by the ALM Rangers. It gives you some basic information, and it also describes how to install the process template and how to create a new Team Project based on this process template. In this post, I will talk a little bit more in detail about how this process template works. Let’s see how it looks like under the hood.

Work Item Types

Let’s start with the work item types you have when using the Kanban process template. The process template provides the following Work Item Types:

  1. Card: This is the unit of work that is tracked through your software development process. A Card represents value demand or failure demand on your team. You can specify a type of Card. By default the following Card types are provided, although you can customize the card types by changing the Kanban Card Types global list:
    • Work Task: This represents demand on your team for work that has value for your customer (value demand).
    • Team Task: This represents demand on your team for work that has intangible value. Typically these includes work such as setting test environments, re-factoring some code etc.
    • Problem: This represents demand on your team to rectify a problem (failure demand).
  2. Process Step: This Work Item Type is used to define information about the steps in your process. In particular this is where the WIP limits are defined for each step of your process.
  3. Blocker: Used to represent a problem that is blocking the progress of a Card. The Card work item has a tab where blockers can be listed.
  4. Bug: Used to track bugs.
  5. Shared Step: Used to define a reusable set of test steps.
  6. Test Case: Defines a test case.

Process

One thing which is really important when using Kanban is the easiness of changing your process. Your process will change over time! One of the requirements of the Kanban Process Template is that it has to be possible to easily change the steps of your process. Let’s take a look at the following image:

In general, you have 3 big states (in blue). A planned (backlog), In Progress and Complete (closed) state. The planned and complete states are the start and end states, and they have no queue associated with them. When you create a new ‘card’ work item, the starting state will always be the backlog. When the card moves to ‘In Progress’, you will have the option to select in which working state it’s in. And those states are customizable.

When you create a new Team Project based on the Kanban Process template, you have 4 ‘working states’. Analyze, Implement, Test and Review. Those states are defined by the ‘Process Step‘ work item. So by default, there are 4 process step work items. To manage the order of the steps in the flow (from left to right), you can use the ‘order‘ field from the work item type. The lower the number, the more left on the flow. By default, analyze is 10, implement is 20, test is 30,… On each process step work item, it’s also possible to provide the Work In Progress (WIP) limit. This number will be used for visualization on the Kanban Board. You can also provide some exit criteria (also known as -the definition of done-). For example:

Global List Synchronizer

When you add a process step to your Team Project, it has to become available to your cards. Meaning that it has to be possible to select the correct state on the card work item. The list of possible states that can be used on a card are stored in a global list on TFS. To synchronize this list whenever you change or add a process step, there is a background process called the Global List Synchronizer, who will synchronize the list of process steps used in the Card Work Item Type with the current list of Process Steps. As you add, change or remove Process Step work items, the list of valid process steps in the Card work items changes accordingly. It modifies the Card work item type definition so that each Team Project uses its own Global List to provide the list of process steps. In fact, you get something like this:

The Global List Synchronizer is something that has to be installed. Installation is really simple, just download the bits from CodePlex. Open the downloaded item, and unzip the file ‘Global List Updater Source Code.zip‘. Open the correct (TFS 2010 or TFS 2012) GlobalListUpdater solution (with either Visual Studio 2010 or 2012). Change the build configuration to ‘Release’ and build the application. In the output folder, you should now see the following files:

Next step is to install it on your Team Foundation Server. The installation process is quite simple.

  1. Log in to the Application Tier server.
  2. For Team Foundation Sever 2010: Copy the compiled assemblies (including the .config file) to <System Drive>:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins.
  3. For Team Foundation Server 2012: Copy the compiled assemblies  (including the .config file) to <System Drive>:\Program Files\Microsoft Team Foundation Server 11.0\Application Tier\Web Services\bin\Plugins.
  4. If you have multiple Application Tiers, repeat step 1-3 for each of them.

After you copied the files to the plugin folder, TFS will detect this and will restart the application tier. This way, the plugin will be hooked to TFS and will be able to interact with TFS events (like work item changes). You can see this in the event log:

To test if the plugin is doing its work, open a process step work item (using Visual Studio, or the Web Access) and change the title of the item. Save the work item. Now create a new ‘card’ work item, save it in the ‘backlog state’, change it to ‘In Progress’ and see if you can select the modified process step. In my case, I changed the process step ‘ Implement’ to ‘Implement(test)’. You also can look at the event log on the TFS server, and you will see all output of the plugin listed there:

Ok great, so now you have an overview of how the process template is constructed, which work item types you have and how the Global List Synchronizer works. In a next post, I will show you a little bit more about how you can use the process template, how you can use the work item queries and how you can use reporting to view all information about your Kanban process.

Thanks for reading!

Implementing Kanban with TFS: Introduction

In this blogpost, I want to talk a little bit about how Team Foundation Server can help you to support your Kanban Process. We will use the Practical Kanban Guidance from the ALM Rangers, where I am also a part of the team. I will talk about the the process template requirements and how to get started.

First of all, really short: what is Kanban? Well, Kanban is a method to visualize the development work flow and the work in progress. Kanban has 5 principles:

    • Visualize the workflow
    • Limit WIP
    • Manage the flow of work
    • Make process policies explicit
    • Improve collaboratively

Using these aspects, you can highlight any bottlenecks in the development process. You have a visual overview of the things which are happening in your team, so you can guide it. Perhaps change the process, change the WIP limits, ..

Requirements

As you know, the way TFS supports your development process is defined by a process template. This is a collection of files that together define various process elements of a team project. There are a number of requirements that need to be satisfied to allow teams to get the most out of a Kanban-enabled process template for Team Foundation Server.

1. The process template should make it easy to modify the states in the process flow: Kanban is about continuous improvement. During the life of a project a team may wish to modify their flow, adding or removing states. Therefore the process template should make it easy to add and remove states in the process flow.

 2. The process template should allow Work In Progress limits to be represented and reported on: One of the few fundamental concepts in Kanban is to limit the amount of work in progress (WIP). This means that the process template should allow us to specify a WIP limit for each state in the lifecycle of a card.

3. The process template should allow each state in the process flow to have an In Progress and Done sub-state: The process template should allow for In Progress and Done sub-states and report on WIP limits across the two sub-states.

4. The process template should support arbitrary state transitions: Kanban is not a software development method and does not dictate anything about how a team should implement its process. Therefore a card should be allowed to be moved into any Kanban state from any other Kanban state.

5. The process template should support hosted Team Foundation Server instances: To give teams maximum flexibility, a Kanban-enabled process template should not require project collection administration rights to make changes such as the states in the process flow and WIP limits.

6. The process template should include a Cumulative Flow Diagram Report and a Kanban Board: It has to be easy to see when bottlenecks are occurring, in which state the cards are, what’s the cycle time,..

Microsoft Kanban 1.0

Based on those requirements, the ALM Rangers came up with a brand new process template called: Microsoft Kanban 1.0. This is a flexible process template allowing you to easily adapt your Kanban process on Team Foundation Server. You can download the process template here, including all documentation and guidance you need.

In a next  post, I will explain how the process template actually works and how you can use it.  But first, let’s take a look how you can install this process template. Once you have downloaded the bits (both Team Foundation Server 2010 and 2012 are supported), you need to upload it to Team Foundation Server, so that you can create a new Team Project based on that template.

1. Open Visual Studio (we will use 2012, but it’s quite similar on 2010), go to ‘Team Explorer’, click ‘Settings – Process Template Manager’, there you click ‘Upload’ and locate the folder with the process template. I will use ‘Microsoft Kanban 1.0 – dev11’, because I’m using TFS 2012.

2. After the upload is complete, you should now see ‘Microsoft Kanban 1.0’ in the list of process templates.

3. Now create a new Team Project using this process template. In Team Explorer, go to ‘Projects and My Teams -> New Team Project‘. Complete the wizard and select the Kanban process template:

4. That’s it. You have a Team Project based on the Microsoft Kanban 1.0 process template. If you open your Team Explorer, go to Work Items and you can start creating cards (based on the Card Work Item Type) and model your process (based on the Process Step Work Item Type).

More in-depth information about how to use the process template will follow in a next post. I will also talk about ‘the Global List Synchronizer’, who will be responsible for the synchronization of process steps.

If you have any valuable feedback, just leave a message or start a discussion on the codePlex forum.

Thanks!

ALM Rangers Practical Kanban Guidance RC

Yesterday, together with the Visual Studio and Team Foundation Server 2012 RC release, the ALM Rangers have also SIMultaneously SHIPped their guidance as RC. As I’m really proud to have been involved in the ALM Rangers team, I can tell you that we also shipped the RC version of the Practical Kanban Guidance.

The Practical Kanban Guidance offers teams that are new to Kanban and teams that are using a manual, paper or whiteboard-based Kanban board, guidance and tool support for Kanban in Team Foundation Server 2010 and Team Foundation Server 2012. The guidance also describes how Team Foundation Server can capture metrics and other information that can be used to track and continuously improve a team’s software delivery process.

You can check it on the CodePlex project. If you have any suggestions for improvements, remarks, bugs,… just let us know! Your feedback is really valuable.

Enjoy the release!