Share via


ACTION Element (Work Item Type Definition Schema)

If you have code that changes the state of a work item, you can generalize that code by using the ACTION element to associate your action with the appropriate state transition. You can get the post-action state of that work item by passing the value of your action to the WorkItem.GetNextState method. The version control check-in dialog box uses this method to resolve bugs and close tasks that are associated with the check-in. For more information, see the WorkItem.GetNextState method.

Schema Hierarchy

WITD Element (Work Item Type Definition Schema)

    WORKITEMTYPE Element (Work Item Type Definition Schema)

        WORKFLOW Element (Work Item Type Definition Schema)

            TRANSITIONS Element (Work Item Type Definition Schema)

                TRANSITION Element (Work Item Type Definition Schema)

                    ACTIONS Element (Work Item Type Definition Schema)

                        ACTION Element (Work Item Type Definition Schema)

<xs:element name="ACTION" type="typelib:ListItem" minOccurs="0" maxOccurs="unbounded"/>

Attributes and Elements

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

Attributes

Attribute

Description

value

Required typelib:ListItem attribute.

The name of the action. You should follow the same naming conventions for actions as for field reference names. For example, Team Foundation version control uses Microsoft.VSTS.Actions.CheckIn to identify the transition that is appropriate for work items that are associated with the check-in.

Child Elements

None

Parent Elements

Element

Description

ACTIONS Element (Work Item Type Definition Schema)

Optional element.

Defines a collection of ACTION elements.

Remarks

ACTION is an optional child element of ACTIONS.

minOccurs="0"

maxOccurs="unbounded"

Example

<ACTION value="NameOfAction" />

Element Information

Namespace

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

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

typelib:ListItem

Can Be Empty

Not applicable

See Also

Other Resources

Defining and Customizing Work Item Workflow