It's all about the answers!

Ask a question

Mapping a workitemtype during import from CQ possible ?


Sean G Wilbur (87222421) | asked Jun 04 '10, 11:46 a.m.
JAZZ DEVELOPER
I am trying to map a set of ClearQuest records during import to different work item types, everything is getting mapped to Defect instead of my custom types.

I have a field that dictated the team responsible in CQ, now this will map to a few different variants of a similar Work Item. I have tried a few variations on this without success so far, this is the basic syntax of my mapping file:

Here requested_team is the CQ field, and I have baned the attributeType mappings to clarify the to and from respectively.


<attribute sourceId="requested_team" targetId="com.ibm.team.workitem.attribute.workitemtype" />
<attributeType targetId="requested_team" >
<value sourceId="CQ Team 1" targetId="RTC WI Type 1"/>
<value sourceId="CQ Team 2" targetId="RTC WI Type 1"/>
<value sourceId="CQ Team 3" targetId="RTC WI Type 1"/>
</attributeType>


* Is this something I should be able to do ?
* If it should work, would the targetId here be the Name or the ID of the work item type ?

I have been following the doc and wiki on this stuff but I am not sure if there are inconsistencies with those or if it really is this confusing :)

http://jazz.net/wiki/bin/view/Main/CQImportWizardTips

This is confusing to me:
<attribute sourceId="Priority" targetId="com.ibm.team.workitem.attribute.priority"/>

<attributeType targetId="priority">
<value sourceId="1-Resolve Immediately" targetId="priority.literal.l4" />
<value sourceId="2-Give High Attention" targetId="priority.literal.l4" />
<value sourceId="3-Normal Queue" targetId="priority.literal.l3"/>
<value sourceId="4-Low Priority" targetId="priority.literal.l2" />
<value sourceId="" targetId="priority.literal.l1" />
</attributeType>


Shouldn't it be:
<attribute sourceId="Priority" targetId="com.ibm.team.workitem.attribute.priority"/>

<attributeType targetId="com.ibm.team.workitem.attribute.priority">
<value sourceId="1-Resolve Immediately" targetId="priority.literal.l4" />
<value sourceId="2-Give High Attention" targetId="priority.literal.l4" />
<value sourceId="3-Normal Queue" targetId="priority.literal.l3"/>
<value sourceId="4-Low Priority" targetId="priority.literal.l2" />
<value sourceId="" targetId="priority.literal.l1" />
</attributeType>


TIA for any tips or corrections to get me on the right track here.

-Sean

2 answers



permanent link
Lorelei Ngooi (1.5k22) | answered Jun 04 '10, 12:21 p.m.
JAZZ DEVELOPER
Try the following:

<attribute sourceId="requested_team" targetId="com.ibm.team.workitem.attribute.workitemtype" />
<value sourceId="CQ Team 1" targetId="RTC WI Type 1"/>
<value sourceId="CQ Team 2" targetId="RTC WI Type 1"/>
<value sourceId="CQ Team 3" targetId="RTC WI Type 1"/>

where the value of the target id is the work item type id.

permanent link
Sean G Wilbur (87222421) | answered Jun 04 '10, 3:10 p.m.
JAZZ DEVELOPER
Thank you for the pointer, it looks like the actual defined type id is what needs to be used here, but I haven't found a good way to perform the mapping for values that need to be updated to match RTC. So when I use just


<attribute sourceId="requested_team" targetId="com.ibm.team.workitem.attribute.workitemtype" />


And update the actual import xml with the corresponding work item id in RTC it works.

Is attributeType mapping valid for this or is it easier to export to zip and run the translation via some helper scripts or something on the xml data before the import ? Same question for any other field that is not mentioned in the table of valid attributeType's that can be mapped.

From https://jazz.net/wiki/bin/view/Main/CQImportWizardTips

The following is a list of work item attribute types for the above work item attributes that have a type:

Type Work Item Attributes
category com.ibm.team.workitem.attribute.category
contributor com.ibm.team.workitem.attribute.creator, com.ibm.team.workitem.attribute.owner
deliverable com.ibm.team.workitem.attribute.version
interval com.ibm.team.workitem.attribute.target
priority com.ibm.team.workitem.attribute.priority
severity com.ibm.team.workitem.attribute.severity


-Sean

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.