Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

STATE Element (Work Item Type Definition Schema)

Updated: June 2010

Defines a valid workflow state for a type of work item. The STATE element can contain an optional FIELDS element that references rules and conditions that will be applied to a specific field when a work item of that type makes the transition to the 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>

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 that will be applied to the field when a work item makes the transition to the new state.

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.

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).

The following example defines an Unapproved state.

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

The following example defines an Active state and specifies the values to be assigned to two fields.

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

Namespace

http://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

Date

History

Reason

June 2010

Clarified that the FIELDS element is optional and references the FIELDS (WORKFLOW) element. element.

Customer feedback.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft