Click here to Skip to main content
13,291,084 members (58,701 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 29 May 2013

Using TFS Kanban Column State to the Warehouse

, 29 May 2013
Rate this:
Please Sign up or sign in to vote.
How to use TFS Kanban column state to the warehouse


For a while, I have been wondering and querying if it is possible to see or use the customizable Kanban columns in the warehouse for reporting purposes. The answer many times comes up as no. Having done a lot of customization of TFS lately, I decided to take a stab at it.

Below is my solution for getting the Kanban column state into the warehouse.


First, you’ll need to add a custom field to a Work Item Type, in a previous post Getting Html Fields Data into your TFS Warehouse, I show how to add a new field. For this example, we will add a new field that matches the images below:


Note: There will be no reason to add this field to the layout.


Next, we will create a new Subscriber. Create a new Class Library and add a reference to Microsoft.TeamFoundation.Framework.Server.dll, v11.0.0.0 – This assembly can be found in the project files attached but also in the directory C:\Program Files\Microsoft Team Foundation Server 11.0\Tools on the TFS server.

The function of interest for this post is the PopulateKanBanColumnField, this method is shown below but you can grab the project code and see the full implementation.

private bool PopulateKanBanColumnField(WorkItem wiCurrent)
    bool result = false;

    if (wiCurrent.Fields.Contains("KanBan State") && 
       wiCurrent.Fields["Work Item Type"].Value.ToString() == "User Story")
        foreach (Field field in wiCurrent.Fields)
            if (field.Name.ToLower().EndsWith(".kanban.column") 
            && this.IsGUID(field.Name.Remove(field.Name.ToLower().IndexOf(".kanban.column"))) 
            && wiCurrent.Fields["KanBan State"].Value != field.Value)
                wiCurrent.Fields["KanBan State"].Value = field.Value;
                result = true;

    return result;


Now compile this and copy the output assemblies to C:\Program Files\Microsoft Team Foundation Server 11.0\Application Tier\Web Services\bin\Plugins on the TFS server.


  1. Every time you move a work item that this subscriber effects, it will save 2 revisions to the system, i.e.: when moving from Backlog to In progress, it will save the work item and then the rule will fire, find that work item in the store and then update the field.
  2. I have only tested that this works with TFS 2012 Update 2.


Hope this helps and allows for more people to use the Kanban columns in their teams because they can now report on it Smile.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Gordon Beeming (RSA)
Software Developer Nologo Studios
South Africa South Africa
Gordon Beeming works at Nologo Studios in the sunny city of Durban, South Africa. His current focus is on Devloper Efficiencies and R&D. When he's not hacking away at a keyboard in Visual Studio he'll generally be relaxing with his family or hitting the black top getting in some mileage. He is a Visual Studio ALM Rangers, Visual Studio ALM MVP.

You may also be interested in...


Comments and Discussions

QuestionDefault Rule From Pin
MoJo260011-Sep-15 4:05
memberMoJo260011-Sep-15 4:05 
QuestionSource link broken Pin
Timker12-Jun-14 9:00
memberTimker12-Jun-14 9:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171207.1 | Last Updated 29 May 2013
Article Copyright 2013 by Gordon Beeming (RSA)
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid