Welcome to the Jazz Community Forum
How do I map clearquest user to a different user in RTC when importing CQ records?

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

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

Hi Matt,
I set this
<attribute sourceId="owner" targetId="com.ibm.team.workitem.attribute.owner"/>
But then the owner gets set to Unassigned.

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.