Work Item HTMLFieldControl Content

421 views Asked by At

I am trying to pre-populate some a few different objects in a User Story in my TFS2012 work items list. The HTMLFieldControl is can be found in the Work Item Types section and I can see that it's created here:

<Tab Label="Details">
   <Control FieldName="System.Description" Type="HtmlFieldControl" Dock="Fill" />
</Tab>

I've been looking on Google but I just can't seem to find anything around adding text into this field so that it is always available, perhaps I'm just doing something wrong.

Would doing something similar to this give me the results I require? I can't really just try it and potentially break the system (which is unfortunate) so I need some guidance so that I could quickly fix any formatting / spelling without having to roll back any changes.

<Tab Label="Details">
   <Control FieldName="System.Description" Type="HtmlFieldControl" Dock="Fill" >
       <FIELD name="Description" refname="System.Description" type="Text" Content="Hello there"/>
   </Control>
</Tab>

Obviously the above is purely made up (from the FIELD section) but I included here just along the lines of what I was thinking and hopefully to show what I'm trying to do.


1

There are 1 answers

0
Riegardt Steyn On BEST ANSWER

You were looking in the wrong place; those are the definitions for the form (aka, how the Work Item is displayed graphically). You need to scroll up to the top, under FIELDS, and find this:

<FIELD name="Description" refname="System.Description" type="HTML" />

...then change it to this:

<FIELD name="Description" refname="System.Description" type="HTML">
    <DEFAULT from="value" value="Hello there" />
</FIELD>