Category Archives: Work Items

TFS: Description HTML field is Read Only in Excel

We have recently moved towards using Team Foundation Sever (TFS) as our main collaboration environment. Previously, we had been just using it for Source Control and tracking bugs in Fogbugz. TFS has several advantages, which I will get into in another post, but there are a lot of quirks.

One of the things I found great, then annoying, with TFS is the ability to edit all the work items in Excel. We used this for creating our initial backlog, populating the Description HTML field with descriptions of the use case. However, when I went back to edit them, I found out that HTML items are only editable in Excel when you first create them. We don’t use the HTML abilities of the Descrpition, so we decided to switch to just the “plain text” version of description instead.

WARNING: Do this in a test project first, so you know what you are getting yourself into.

So I cracked out my trusty text editor and started editing the product workflow item XML – I’ll cover this in more detail later, but what you need to do is this:

(Command Prompt in  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE)
witadmin exportwitd /collection:http://yourcollection/tfs /p:ProjectYouAreChanging /n:"Product Backlog Item" /f:productbacklogitem.xml

Now open up the xml file in your trusty editor and change the line:

<Control FieldName="Microsoft.VSTS.Common.DescriptionHtml" Type="HtmlFieldControl" Label="" LabelPosition="Top" Dock="Fill" />


<Control FieldName="System.Description" Type="HtmlFieldControl" Label="" LabelPosition="Top" Dock="Fill" />

Now import your new Work Item Definition:

witadmin importwitd /collection:http://yourcollection/tfs /p:ProjectYouAreChanging /f:productbacklogitem.xml

The HTML Field Control is smart enough to realize that it should only allow text in this field, and when it displays in Visual Studio and Team Web Access, it works like an old-school Textbox control.

It was really easy to update the System.Description field with the old content – just create a custom query of all your backlog items, and select the Description and Description HTML fields. Open the result in Excel, and copy and paste all the data and press Publish.

Another bonus is that the Description Field is indexed, so it should come up in search results (haven’t tested this yet, though).