by Ewald Hofman
4. August 2009 05:41
By default the description field in the work item definition (for example the Task work item), is plain text. To modify the type of the field to Html, you have to do the following:
| Step |
Action |
| 1 |
Open the command prompt (Run as Administrator) |
| 2 |
Go to the folder %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE |
| 3 |
Export the work item with the following command:
witadmin exportwitd /s http:// <server> :<port>/<virtual directory>/<project collection> /p <team project> /n <work item type name> /f <location>
Example:
|
| 4 |
Open the work item definition (in the example c:\task.xml) in Visual Studio or any other xml editor |
| 5 |
Go to the FIELD
<FIELD name="Description" refname="System.Description" type="PlainText"> <HELPTEXT>What to do, pointers to resources and inputs, design notes, exit criteria</HELPTEXT> </FIELD>
|
| 6 |
You cannot change the type of an existing field, so just add a new field. Add a new FIELD section to the xml file:
<FIELD name="DescriptionHtml" refname="Custom.DescriptionHtml" type="HTML"> <HELPTEXT>What to do, pointers to resources and inputs, design notes, exit criteria</HELPTEXT> </FIELD>
|
| 7 |
Now change the field that is shown in the description textbox. Go to the section
<Control FieldName="System.Description" Type="HtmlFieldControl" Label="&Description:" LabelPosition="Top" Dock="Fill" />
|
| 8 |
And change it to:
<Control FieldName="Custom.DescriptionHtml" Type="HtmlFieldControl" Label="&Description:" LabelPosition="Top" Dock="Fill" />
|
| 9 |
Save the file |
| 10 |
Import the new work item definintion with the command:
witadmin importwitd /s http:// <server> :<port>/<virtual directory>/<project collection> /p <team project> /f <location>
Example:
|
When you have completed the tasks, your new Task work item will look like:
