Share via


STATE Element (Work Item Type Definition Schema)

Defines a valid state for the work item type and can contain a FIELDS element that references rules and conditions to be applied to a specific field when a work item makes the transition to that state.

Schema Hierarchy

WITD Element (Work Item Type Definition Schema)

    WORKITEMTYPE Element (Work Item Type Definition Schema)

        WORKFLOW Element (Work Item Type Definition Schema)

            STATES Element (Work Item Type Definition Schema)

                STATE Element (Work Item Type Definition Schema)

<xs:element name="STATE" type="State" minOccurs="1" maxOccurs="unbounded"/>

<STATE value="value of state">
    <FIELDS>…</FIELDS>
</STATE>

Attributes and Elements

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

Attributes

Attribute

Description

value

Required State attribute.

The value of the state (for example, Active).

Child Elements

Element

Description

FIELDS Element (WORKFLOW)

Optional element.

Defines a collection of FIELD elements that specify conditions to be applied to the field when the work item makes the transition to the new state. For more information, see FIELD Element (WORKFLOW).

Parent Elements

Element

Description

STATES Element (Work Item Type Definition Schema)

Required element.

Defines a collection of STATE elements that describe the valid states that the work item type can be in.

Remarks

STATE is a required child element of STATES.

minOccurs="1"

maxOccurs="unbounded"

When you specify the value of a field for a state, you use the FIELDS and FIELD elements for workflow. For more information, see FIELDS Element (WORKFLOW) and FIELD Element (WORKFLOW).

Example

<STATE value="Unapproved"></STATE>

<STATE value="Active">
    <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
... 
    <FIELDS>
</STATE>

Element Information

Namespace

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

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

State Complex Type (Work Item Type Definition Schema)

Can Be Empty

Yes

See Also

Tasks

How to: Change the Workflow of a Work Item Type

Other Resources

Defining and Customizing Work Item Workflow