1
votes

I'm trying to set the DEFAULT rule for the System.Description field on the User Story Work Item Type. Back in TFS 2010 that field was plain text, but in TFS2015 it got converted to Html, so I thought I could add some Html markup to it.

<FieldDefinition name="Description" refname="System.Description" type="HTML">
  <DEFAULT from="value" value="&lt;p&gt;&lt;b&gt;En tant que:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;[rôle ou personne]&lt;/p&gt;&lt;p&gt;&lt;b&gt;Je désire:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;[Nouvelle fonctionnalité]&lt;/p&gt;&lt;p&gt;&lt;b&gt;Puisque:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;[raisons et contexte qui motivent le changement]&lt;/p&gt;&lt;p&gt;&lt;b&gt;Tests d'acceptation et détails techniques:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;[Ce qui déterminera que la story est complété + les détails techniques]&lt;/p&gt;" />
  <HELPTEXT>Description or reference to the story that must work for this work to be considered complete</HELPTEXT>
</FieldDefinition>

But now I'm stuck with this error:

The 'value' [...] attribute is invalid according to its datatype 'http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typelib:NonEmptyConstant' - The actual length is greater than the MaxLength value.

Screen shot

From what I gather, this field is limited to 255 characters. Is there a way to increase this? There is no such limitation for the Bug WIT, but the field Ref Name is also different.

1
Please edit your question to include the relevant section of XML from your work item type definition.Daniel Mann

1 Answers

0
votes

HTML type of the filed supports the ability to capture rich-text data and to use longer text descriptions such as a work item description. An HTML field differs from a PlainText field in that an HTML field is strongly typed to HTML for richer displays of information.

The limitation issue is related to the HELPTEXT. By using HELPTEXT, you create the tooltip for the field. You are limited to 255 characters with this method.

You can use LabelText instead of HELPTEXT which you can add as much information as you want. More detail info, please refer the link from MSDN: Provide help text, hyperlinks, or web content on a work item form