Macro

The macro finds the work item ID for a specific work item type given a list of semicolon-separated work IDs.

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

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

Macro Specific Attributes
Attribute Description Required
idList A list of semicolon separated work IDs. Yes
typeId The type ID for the target work item. Examples for work item type ID:

Type: ID:
Defect defect
Story com.ibm.team.apt.workItemType.story

Specify either typeId or typeName, but not both.

No
typeName The type display name for the target work item. Examples for work item name:

Type: Name:
Defect Defect
Story Story

Specify either typeId or typeName, but not both.

Yes
property Name of the Ant property in which to return the ID of the target work item. If the target work item is not found, this property will not be set. Yes

Notes

Examples

Find the Epic work item in a string of work item IDs

<target name="main" description="main">
    
    <FindWorkItemIdForWorkItemType
        repositoryAddress="${repositoryAddress}"
        userId="${userId}"
        password="${password}"
        idList="${team.enterprise.promotion.promotedWorkItemIds}"
        typeId="com.ibm.team.apt.workItemType.epic"
        property="foundId"/>
    
    <echo>id: ${foundId}</echo>
    
</target>
    

An example Ant script is located in: "install_location/buildsystem/buildtoolkit/scripts/extensions/imports"