Share via


FieldDefinition Complex Type (WORKITEMTYPE Element)

Defines the elements and attributes in the FIELD Element.

<xs:complexType name="FieldDefinition">
    <xs:sequence minOccurs="0">
        <xs:group ref="PlainRules" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="HELPTEXT" type="HelpTextRule" minOccurs="0" maxOccurs="1"/>
        <xs:group ref="PlainRules" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="name" type="typelib:FieldName" use="required"/>
    <xs:attribute name="refname" type="typelib:ReferenceFieldName" use="required"/>
    <xs:attribute name="type" type="FieldType" use="required"/>
    <xs:attribute name="syncnamechanges" type="xs:boolean" use="optional" />
    <xs:attribute name="reportable" type="Reportability" use="optional"/>
    <xs:attribute name="formula" type="MeasureFormula" use="optional"/>
</xs:complexType>

Attributes and Elements

The following sections describe attributes, groups, child elements, and parent elements.

Attributes

Attribute

Description

name

Required attribute.

The display name of the field where the rules and condition are applied. The attribute type is typelib:FieldName. Minimum length: 1; maximum length: 128.

Pattern value: ^[^\.\[\]]+$

Pattern value example: Assigned To

For more information, see Naming Conventions for Work Item Tracking Objects.

refname

Required attribute.

The reference name of the work item field where the rules and conditions are applied. The reference name must match the reference name defined in the field definition's FIELD element. The attribute type is typelib:ReferenceFieldName. Minimum length: 1; maximum length: 70.

Pattern value: ^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z0-9_]+)+$

Pattern value example: Company.Division.IssueType

For more information, see Naming Conventions for Work Item Tracking Objects.

type

Required attribute.

The type of value the field accepts. The attribute type is FieldType Simple Type (Work Item Type Definition Schema), restricted to the following values:

  • String

  • Integer

  • Double

  • DateTime

  • PlainText

  • HTML

  • TreePath

  • History

  • GUID

The restriction base is xs:string.

For more information, see Working with Work Item Fields.

syncnamechanges

Optional attribute.

The data in the field will be updated as changes are made to person names defined in Active Directory or a Workgroup. The attribute type is xs:boolean.

Only fields whose data type is String can have syncnamechanges set to true. This attribute should only be set for custom fields that will contain person names that you want to be kept synchronized with data stored in Active Directory or a Workgroup.

reportable

Optional attribute.

The data from the field will be exported to the data warehouse and can be included in reports. The attribute type is Reportability Simple Type (Work Item Type Definition Schema), restricted to the following values:

  • dimension

  • detail

  • measure

The restriction base is xs:string.

For more information, see Using System Fields and Fields Defined by the MSF Process Templates.

formula

Optional attribute.

The aggregation type for the reportable value measure. Currently, sum is the only supported aggregation type for measure. The restriction base is xs:string.

Child Elements

Element

Description

HELPTEXT Element (Work Item Type Definition Schema)

Optional element.

Defines the text displayed in the tooltip for the field.

Parent Elements

None

Remarks

The FieldDefinition Complex Type is the FIELD Element (WORKITEMTYPE Element) type.

Groups

Group

Description

PlainRules Group (Work Item Type Definition Schema)

Optional group.

Incorporates the Rules Group (Work Item Type Definition Schema) and Conditions Group (Work Item Type Definition Schema) that specify rules and conditions to use in the FIELD element.

Element Information

Namespace

https://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Can be Empty

Not applicable

See Also

Reference

Managing Work Item Fields [witadmin]

Concepts

Working with Work Item Fields

Other Resources

Customizing and Using Work Item Fields

Work Item Type Definition Schema