Tuesday, September 18, 2012

Marking Kanban Items as Blocked

Sometimes items in your Kanban workflow reach a state where they cannot proceed. Maybe they’re have a dependency on another item; maybe there’s an issue or pending decision. When this happens, you want to increase the visibility of these issues by marking them as blocked.

Fortunately, the SEP Teamworks tool which I mentioned in my last post, supports such a feature. Simply right-click (or on a touch device, tap-and-hold) and use the context-menu to mark it as blocked.

Kanban_marked_as_blocked

Simple, right? Well, the first time I tried this feature, the tool crashed. Turns out that you must have a Blocked field in your work item definition.

Adding this field to your work item definition is easy.

  1. Retrieve the work item definition from your TFS server using the witadmin exportwitd command:

    witadmin exportwitd /collection:<server-name> /p:<project-name> /n:Task /f:Task.xml
  2. Insert a new field definition into the FIELDS node. Note that the namespace doesn’t matter. As TFS doesn’t contain a definition for Boolean fields, you must set it up as a string with Yes/No values.

    <witd:WITD application="Work item type editor" version="1.0" xmlns:witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
      <WORKITEMTYPE name="Task">
    
        <!-- edited for clarity -->
    
        <FIELDS>
    
          <FIELD name="Blocked" refname="Custom.Blocked" type="String">
            <ALLOWEDVALUES expanditems="true">
                <LISTITEM value="Yes" />
                <LISTITEM value="No" />
               </ALLOWEDVALUES>
               <DEFAULT from="value" value="No" />
          </FIELD>
    
        </FIELDS>
      </WORKITEMTYPE>
    </witd:WITD>
    
    
  3. (Optional, but highly recommended) If you want to change the Blocked field outside of the SEP Teamworks tool (such as inside TFS), you’ll need to describe the field inside the FORM node. The syntax is relatively straightforward:

    <witd:WITD application="Work item type editor" version="1.0" xmlns:witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
      <WORKITEMTYPE name="Task">
    
    
        <!--edited for clarity -->
        <FORM>
    
           <Control Type="FieldControl" FieldName="Custom.Blocked" Label="Blocked:" />
    
        </FORM>
    
      </WORKITEMTYPE>
    </witd:WITD>
  4. Lastly, push your changed work item definition back to the server using the witadmin tool:

    witadmin importwitd /collection:<server-name> /p:<project-name> /f:task.xml

With these changes in place, the SEP Teamworks tool puts a visual over blocked items.

Kanban_blocked_item

My next post will look at some other handy customizations to the TFS work flow.

0 comments: