The task is used to create an EWM® work item. Store elements designate which attributes to set and their initial value. The task creates the specified work item, sets the work item’s attributes with the specified values, saves the work item, and returns the work item id in the property specified. All required values for the work item must be specified.

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
processAreaName Name of the process area or project which contains the work item definitions. Yes
property Name of the Ant property in which to store the work item ID. No
typeId Specifies whether or not the workItemType is an ID. Specify true if the workItemType is an ID. Specify false if the workItemType is a label. The default is false. No
workItemId The ID of the work item to update. Yes

Store Elements

Store elements are specified within the element. Store elements designate which work item attributes to set and the values for those attributes. All Store elements are optional. At least one Store element is required. A name and value is required for each Store element. The name attribute specifies the name of an EWM work item attribute. The value attribute specifies the value of the EWM work item attribute. Some EWM work item attributes have options which are described below.

The following table describes the work item attributes that can be specified via Store elements, their name attribute value, their requirements, and their options:

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

The following table describes the Optional Store Element Attributes and their possible values:

Store Element Notes

Examples

Create build definitions

<target name="task" if="run.task">
  
  <xt:createWorkItem
      repositoryAddress="${repositoryAddress}"
      userId="${userId}"
      passwordFile="${passwordFile}"
      processAreaName="IMS_SB_IMS"
      property="taskId"
      workItemType="Task"
    >
    <xt:store name="attachment"  value="D:\rtc\Builds\PI37999.Regtest.Work items included in build.html"/>
    <xt:store name="category"    value="IMS Release"/>
    <xt:store name="comments"    value="This is a &lt;b&gt;bold&lt;/b&gt; comment." xmlText="true"/>
    <xt:store name="description" value="This is the description of the task."/>
    <xt:store name="dueDate"     value="2015-05-29"/>
    <xt:store name="estimate"    value="86400000"/>
    <xt:store name="link"        value="181" linkType="RELATED"/>
    <xt:store name="ownedBy"     value="djreilly@us.ibm.com"/>
    <xt:store name="priority"    value="High"/>
    <xt:store name="severity"    value="2 - Major"/>
    <xt:store name="subscriber"  value="mra@us.ibm.com"/>
    <xt:store name="summary"     value="Adding a new task with createWorkItem"/>
    <xt:store name="tags"        value="tag1"/>
    <xt:store name="target"      value="Version 15"/>
  </xt:createWorkItem>
  
  <echo>${taskId}</echo>
  
</target>
    

Result:
Create work item example