It's all about the answers!

Ask a question

How do I map clearquest user to a different user in RTC when importing CQ records?


Karl Weinert (2.0k52736) | asked Mar 06 '13, 1:12 p.m.
JAZZ DEVELOPER
retagged Mar 12 '13, 1:18 p.m. by Hadar Hawk (1882214)
I want to be able to map the CQ owner to a different owner in RTC but it always uses the owner from the CQ record.
So in my example below the new Work Item is always owned by admin.
I want to convert admin to my account karl
I'm following Migrating Rational ClearQuest records to work items

Here's my mapping file:
<?xml version="1.0" encoding="UTF-8"?>
<mapping version="1">
    <attribute sourceId="id" targetId="com.ibm.team.workitem.attribute.summary">
    </attribute>
    <attribute sourceId="Owner" targetId="com.ibm.team.workitem.attribute.owner"/>
    <attributeType targetId="contributor">
        <value sourceId="admin" targetId="karl"/> 
    
    </attributeType>
     <attribute sourceId="Description" targetId="com.ibm.team.workitem.attribute.description"/>
</mapping>

Here's the exported CQ record:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<bugzilla version="3.3" urlbase="">
<bug>
    <dbid>33554441</dbid>
    <bug_id>CQEXP00000009</bug_id>
    <id>CQEXP00000009</id>
    <Owner>admin</Owner>
    <Description>Test RTC Import</Description>
</bug>
</bugzilla>


One answer



permanent link
Matthew Alexander (18126) | answered Mar 06 '13, 4:11 p.m.
JAZZ DEVELOPER
Hi Karl,

I think the problem could be because the sourceId fields are case sensitive.  In your mapping file, <attribute sourceId="Owner" has "Owner" capitalized, while <owner> in your xml is lowercase.  Try changing the mapping file to <attribute sourceId="owner" and let me know if you still have problems.

Thanks,
Matt

Comments
Karl Weinert commented Mar 06 '13, 4:27 p.m.
JAZZ DEVELOPER

Hi Matt,
I set this
    <attribute sourceId="owner" targetId="com.ibm.team.workitem.attribute.owner"/>

But then the owner gets set to Unassigned.


Matthew Alexander commented Mar 06 '13, 4:48 p.m.
JAZZ DEVELOPER

Hi Karl,

One more thing I noticed is that the "Created By" field has "Karl" with a capital K, while the mapping has "karl".  If this is the same user, I'm thinking the mapping file should be capitalized as well.

I think everything else looks good to me.  I did a quick test with xml that contained <owner>admin</owner> and used the mapping below.  It changed the owner for me.

<attribute sourceId="owner" targetId="com.ibm.team.workitem.attribute.owner"/>
    <attributeType targetId="contributor">
        <value sourceId="admin" targetId="karl"/>     
    </attributeType>

Let me know if you still have problems.




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.