Udostępnij za pośrednictwem


DEFAULT Element (Work Item Type Definition Schema)

Defines a default value for the field.

<xs:element name="DEFAULT" type="DefaultRule"/>

Attributes and Elements

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

Attributes

Attribute

Description

for

Optional PlainRule attribute.

The name of a user or group to whom this rule applies.

not

Optional PlainRule attribute.

The name of a user or group to whom this rule does not apply.

from

Required CopyRule attribute.

The source of the value. Specifies whether to copy the default value from the value attribute, the field attribute, the system clock, or the current user. If you specify "value" or "field," you must also include the value or field attribute, respectively.

value

Optional DefaultRule attribute.

The value to copy. Cannot be empty.

field

Optional CopyRule attribute.

The reference name of the field to copy. The reference name must match the reference name that is defined in the field definition FIELD element. For more information, see FIELD Element (WORKITEMTYPE Element).

NoteNote:
If the work item is in the process of being changed, this element rule may select either the current or previous value from the source field.

Child Elements

None

Parent Elements

Element

Description

FIELD Element (WORKFLOW)

Required element.

References a work item field definition and the rules and conditions that apply to the field. The reference is based on the STATE, TRANSITION, DEFAULTREASON, or REASON element that its parent FIELDS element is a child of.

FIELD Element (WORKITEMTYPE Element)

Required element.

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

Remarks

DEFAULT is an optional child element of FIELD (Work Item Type Definition Schema) and FIELD (WORKITEMTYPE element).

Example

<DEFAULT for="user name" not="user name" from="value | field | clock | currentuser" value="value to copy" field="field reference name" />

Element Information

Namespace

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

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

DefaultRule Complex Type (Work Item Type Definition Schema)

Can Be Empty

Not applicable

See Also

Concepts

Available Field Rules

Specifying Field Defaults

Other Resources

Defining Field Rules