It's all about the answers!

Ask a question

Type field in mapping file for import


Sinead Guilfoyle (1122) | asked Feb 14 '14, 5:17 a.m.
Hi

I'm working on an export from JIRA into RTC.  We have an issue type "Enhancement" in JIRA which I want to import into RTC as a Story. 

I have the following in my mapping file but it does not seem to work...

     <attribute sourceId="Type" targetId="com.ibm.team.workitem.workitemtype">
         <value sourceId="Enhancement" targetId="com.ibm.team.apt.workItemType.story"/>
     </attribute> 


Any advice on what I'm doing wrong...I might have the wrong values but they looked the most appropriate from what I could find?  All issues that are a direct mapping work properly (defect to defect, or story to story) but where I want to change the type on import it does not.  The Enhancements keep importing as Defects (default).

I would like to avoid having to write a script to update the export data before importing it, and do this directly in the mapping file if possible.

thanks
Sinead

Comments
sam detweiler commented Feb 14 '14, 6:29 a.m.

if you let the importer generate the mapping file, what does it setup for the types?


3 answers



permanent link
Sinead Guilfoyle (1122) | answered Feb 14 '14, 6:37 a.m.
The generated mapping has

    <attribute sourceId="Type" targetId="Type">
        <value sourceId="Enhancement" targetId="Enhancement"/>
    </attribute>

and when I change the target there to any of the following it still imports the Enhancements as defects which is the default

<value sourceId="Enhancement" targetId="com.ibm.team.apt.workItemType.story"/>
<value sourceId="Enhancement" targetId="Story"/>
<value sourceId="Enhancement" targetId="story"/>

Comments
sam detweiler commented Feb 14 '14, 6:59 a.m.

I can't see my mapping file at the moment. at the top it has what kind of workitems are expected in this mapping. I have three mapping files.. story. defect and all others.

and to make sure, the value in the excel column with the label 'Type' is spelled exactly 'Enhancement'. it is case sensitive.

what is the generated mapping for Story?


permanent link
Sinead Guilfoyle (1122) | answered Feb 14 '14, 7:15 a.m.
Hi Sam

Thanks for the help on this.

The mapping has <value sourceId="Story" targetId="Story"/> for Story. 

I've just tested with commenting out the <attribute sourceId="Type" targetId="Type"> section in the mapping file and it still imports defects as defects, and stories as stories.  This is making me wonder if this  is something that can be influenced by the mapping file at all.

Sinead

Comments
sam detweiler commented Feb 14 '14, 7:21 a.m.

just edit the csv, and change 'Enhancement" to story in that column..

I know you shouldn't have to


permanent link
Sinead Guilfoyle (1122) | answered Feb 14 '14, 7:39 a.m.
Thanks Sam, that's what I was hoping to avoid as we have over 10,000 issues to migrate and a load of other tools already running over the data to do various transformations. I guess one more wont make much difference. 

Thanks again for the advice.

Comments
sam detweiler commented Feb 14 '14, 7:47 a.m.

yeh, I understand..

I just open the csv in excel and use replace in that column.  no need to write a tool.

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.