COPY Element (Work Item Type Definition Schema)
Specifies a value to be copied into the current field.
<COPY for="user name" not="user name" from="value | field | clock | currentuser" value="value" field="field reference name" />
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 specified in the value attribute, the value specified in the field attribute, the value in the system clock, or get the value from the current user. |
value |
Optional CopyRule attribute. You must define this attribute if the from attribute has "value" as its value. The value to copy. Can be empty. |
field |
Optional CopyRule attribute. You must define this attribute if the from attribute has "field" as its value. The reference name of the field to copy. The reference name must match the reference name defined in the field definition's FIELD element. For more information, see FIELD Element (WORKITEMTYPE Element). Note When changing a work item, this element rule is nondeterministic with regards to selecting the current or previous value from another field. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
FIELD (Work Item Type Definition Schema) |
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 (WORKITEMTYPE element) |
Required element. Defines a work item field and specifies the rules and conditions that apply to it. |
WHENCHANGED |
Optional element. Specifies one or more rules to apply to the current field when a specified field is changed. |
WHENNOTCHANGED |
Optional element. Specifies one or more rules to apply to the current field when a specific field is not changed. |
Remarks
COPY is an optional child element of FIELD (Work Item Type Definition Schema), FIELD (WORKITEMTYPE Element), WHENCHANGED, and WHENNOTCHANGED.
Element Information
Namespace |
https://schemas.microsoft.com/VisualStudio/2005/workitemtracking/typedef |
Schema Name |
Work Item Type Definition |
Validation File |
WorkItemTypeDefinition.xsd |
Element Type |
CopyRule |
Can Be Empty |
Not applicable |
See Also
Reference
FIELD Element (Work Item Type Definition Schema)
FIELD Element (WORKITEMTYPE Element)
WHENCHANGED Element (Work Item Type Definition Schema)
WHENNOTCHANGED Element (Work Item Type Definition Schema)