FIELD Element (WORKITEMTYPE Element)

Defines a work item field and specifies the rules and conditions that apply to it.

Schema Hierarchy

WORKITEMTYPE Element (Work Item Type Definition Schema)

    FIELDS Element (WORKITEMTYPE Element)

        FIELD Element (WORKITEMTYPE Element)

<FIELD name="field display name" refname="field reference name" type="String | Integer | Double | DateTime | PlainText | HTML | History | TreePath" reportable="Dimension | Detail | Measure" formula="sum">
    <HELPTEXT>…</HELPTEXT>
    <REQUIRED>…</REQUIRED>
    <READONLY>…</READONLY>
    <EMPTY>…</EMPTY>
    <FROZEN>…</FROZEN>
    <CANNOTLOSEVALUE>…</CANNOTLOSEVALUE>
    <NOTSAMEAS>…</NOTSAMEAS>
    <VALIDUSER>…</VALIDUSER>
    <ALLOWEXISTINGVALUE>…<ALLOWEXISTINGVALUE>
    <MATCH>…</MATCH>
    <ALLOWEDVALUES>…</ALLOWEDVALUES>
    <SUGGESTEDVALUES>…</SUGGESTEDVALUES>
    <PROHIBITEDVALUES>…</PROHIBITEDVALUES>
    <DEFAULT>…</DEFAULT>
    <COPY>…</COPY>
    <SERVERDEFAULT>…</SERVERDEFAULT>
    <WHEN>…</WHEN>
    <WHENNOT>…</WHENNOT>
    <WHENCHANGED>…</WHENCHANGED>
    <WHENNOTCHANGED>…</WHENNOTCHANGED>
<FIELD>

Attributes and Elements

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

Attributes

Attribute Description

name

Required FieldDefinition attribute.

The display name of the field where the rules and condition are applied. For more information, see Field Names.

refname

Required FieldDefinition attribute.

The reference name of the field where the rules and conditions are applied. The reference name must match the reference name defined in the field definition's FIELD element. For more information, see Field Reference Names.

type

Required FieldDefinition attribute.

The type of value the field accepts. For more information, see Field Types.

reportable

Optional FieldDefinition attribute.

The data from the field will be exported to the data warehouse and can be included in reports. For more information, see Using Fields for Reporting.

formula

Optional FieldDefinition attribute.

The aggregation type for the measure reportable type. Currently, sum is the only supported aggregation type for measure. For more information, see witfields.

Child Elements

Element Description

HELPTEXT

Optional element.

Defines the text displayed in the ToolTip for the field.

REQUIRED

Optional element.

Defines the field as required.

READONLY

Optional element.

Defines the field as read-only.

EMPTY

Optional element.

Defines the field as empty.

FROZEN

Optional element.

Defines the field as frozen, meaning that you can only change the field value to NULL.

CANNOTLOSEVALUE

Optional element.

Defines the field as cannot lose value, meaning that once you give the field a value, the field must always contain a non-NULL value.

NOTSAMEAS

Optional element.

Specifies another field the value of which cannot be identical to the value of the current field.

VALIDUSER

Optional element.

Specifies a user or group who can modify the field.

ALLOWEXISTINGVALUE

Optional element.

Defines the field as allow existing value, meaning that the field values that already exist will be allowed, even if they are not valid, but all new field values must be valid.

MATCH

Optional element.

Defines a pattern for the field that the field value must match.

ALLOWEDVALUES

Optional element.

Defines a list of allowed values for the field.

SUGGESTEDVALUES

Optional element.

Defines a list of suggested values for the field.

PROHIBITEDVALUES

Optional element.

Defines a list of prohibited values for the field.

DEFAULT

Optional element.

Defines a default value for the field.

COPY

Optional element.

Specifies another field that contains a value to be copied into the current field.

SERVERDEFAULT

Optional element.

Specifies a server component that will provide the value for the field.

WHEN

Optional element.

Specifies one or more rules to apply to the current field when another field has a specific value.

WHENNOT

Optional element.

Applies one or more rules to the current field when another field does not have a specific value.

WHENCHANGED

Optional element.

Applies one or more rules to the current field when a specific field's value is changed.

WHENNOTCHANGED

Optional element.

Applies one or more rules to the current field when a specific field's value is not changed.

Parent Elements

Element Description

FIELDS

Required Element.

Contains the work item type field definitions.

Remarks

FIELD is a required child element of FIELDS.

minOccurs="1"

maxOccurs="unbounded"

Element Information

Namespace

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

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

FieldDefinition

Can Be Empty

Yes

See Also

Reference

HELPTEXT Element (Work Item Type Definition Schema)

Other Resources

Work Item Type Definition Schema
Defining Work Item Type Fields
Defining Field Rules