The task is used to retrieve attribute values from one EWM® work item and copy them into another EWM work item. Value elements designate which work item attributes to retrieve and copy. The task fetches both work items using the values specified for the fromWorkItemId and toWorkItemId attributes and sets the specified attributes in the toWorkItem with the values from the fromWorkItem. Store elements can be included when invoking . Store elements are used to designate attributes to update in the toWorkItem thus combining the copy and update processes into a single task.

Attributes

The task supports Team Build Attributes, Build Extensions Debugging Attributes, Build Extensions General Attributes, as well as, its own task specific attributes. Click on a link for more information on the common attributes.

The following table describes the task specific attributes for the task:

Task Specific Attributes
Attribute Description Required
fromWorkItemId The id of the work item to copy attribute values from. Yes
toWorkItemId The id of the work item to copy attribute values to. Yes

Value Elements

Value elements are specified within the element. Value elements designate which attributes to copy from the input work item to the output work item. All Value elements are optional. At least one Value element is required. A name attribute is required for each Value element. The name attribute specifies the name of an EWM work item attribute. The following table describes the valid Value element name attribute values and their options:

Work Item Attributes
Name Description Required Store Attributes Optional Store Attributes
approvals Copies work item approvals information.
category Copies work item category (Filed Against) value.
comments Copies work item comments.
contextId Copies work item restricted access group name or project area name if an access group is not defined for the work item.
correctedEstimate Copies work item corrected estimate.
custom Copies work item custom attribute value. fromCustom
toCustom
description Copies work item description.
dueDate Copies work item due date.
duration Copies work item estimate.
estimate Copies work item estimate.
filedAgainst Copies work item category (Filed Against) value.
foundIn Copies work item deliverable.
links Copies work item links.
modified Copies work item last modified date.
modifiedBy Copies work item modifier.
modifiedDate Copies work item last modified date.
ownedBy Copies work item owner.
owner Copies work item owner.
plannedFor Copies work item target iteration.
priority Copies work item priority.
resolution Copies work item resolution state.
resolutionDate Copies work item resolution date.
resolvedBy Copies work item resolver.
resolver Copies work item resolver.
restrictedAccess Copies work item restricted access group name or project area name if an access group is not defined for the work item.
severity Copies work item severity.
startDate Copies work item start date.
subscriptions Copies work item subscribers.
summary Copies work item summary.
tags Copies work item tags.
target Copies work item target iteration.
timeSpent Copies work item time spent.

The following table describes the Required Value Element Attributes and their possible values:

Required Value Element Attributes
Name Value Description
fromCustom Attribute id as defined in the process definition for the EWM project. Specifies the id of the input custom attribute in the fromWorkItem.
toCustom Attribute id as defined in the process definition for the EWM project. Specifies the id of the output custom attribute in the toWorkItem.

Value Element Notes

Store Element Notes

Examples

Copy work item

<target name="task" if="run.task">
  
  <xt:copyWorkItem;
      repositoryAddress="${repositoryAddress}";
      userId="${userId}";
      passwordFile="${passwordFile}";
      fromWorkItemId="352";
      toWorkItemId="358";
    >
    <xt:value name="approvals"/>
    <xt:value name="category"/>
    <xt:value name="comments"/>
    <xt:value name="contextId"/>
    <xt:value name="correctedEstimate"/>
    <xt:value name="description"/>
    <xt:value name="dueDate"/>
    <xt:value name="duration"/>
    <xt:value name="estimate"/>
    <xt:value name="filedAgainst"/>
    <xt:value name="foundIn"/>
    <xt:value name="links"/>
    <xt:value name="modified"/>
    <xt:value name="modifiedBy"/>
    <xt:value name="modifiedDate"/>
    <xt:value name="ownedBy"/>
    <xt:value name="owner"/>
    <xt:value name="plannedFor"/>
    <xt:value name="priority"/>
    <xt:value name="resolution"/>
    <xt:value name="resolutionDate"/>
    <xt:value name="resolvedBy"/>
    <xt:value name="resolver"/>
    <xt:value name="restrictedAccess"/>
    <xt:value name="severity"/>
    <xt:value name="startDate"/>
    <xt:value name="subscriptions"/>
    <xt:value name="summary"/>
    <xt:value name="tags"/>
    <xt:value name="target"/>
    <xt:value name="timeSpent"/>
    <xt:store name="priority" value="High"/>
  </xt:copyWorkItem>
  
</target>
    

From Work Item:
From Work Item

To Work Item:
To Work Item