It's all about the answers!

Ask a question

Specifying Work Item Type when import CSV file


Michael Walker (99215201157) | asked Jan 07 '10, 2:37 p.m.
How do we specify the Work Item Type (i.e Defect, Story, Impedement) when importing Work Items?

Currently it's migrating them all to Defect, I assume because that's the first Work Item Type listed. I'm migrating from a different tool into RTC.

I added the line below to my XML import file for the targetId, but all Work Items still get imported as Defects. In my CSV file the column that specifies the Work Item Type is named TYPE.

targetId="com.ibm.team.workitem.workitemtype"/>

8 answers



permanent link
Marco Bormann (1611910) | answered Jul 21 '10, 8:21 a.m.
In 2.0, mapping is not supported for the work item type (this got added
in 3.0 only). Please use a column named "Type" in the CSV file where the
values match with the display names of the types (e.g. "Task" for a task).


This works perfectly for the creation of new work items but it seems not to work for updates of existing work items (in 2.0).

permanent link
Work Item & UI Commons Team (1.3k1) | answered Jan 22 '10, 4:23 a.m.
In 2.0, mapping is not supported for the work item type (this got added
in 3.0 only). Please use a column named "Type" in the CSV file where the
values match with the display names of the types (e.g. "Task" for a task).

permanent link
Mikael Lönneberg (2631) | answered Jan 21 '10, 11:00 a.m.
I added the line below to my XML import file for the targetId, but all Work Items still get imported as Defects. In my CSV file the column that specifies the Work Item Type is named TYPE.

targetId="com.ibm.team.workitem.workitemtype"/>


I think you are almost there try this instead

attribute sourceId="TYPE" targetId="com.ibm.team.workitem.attribute.type">
value sourceId="APAR" targetId="APAR" />
/attribute>

permanent link
Work Item & UI Commons Team (1.3k1) | answered Jan 11 '10, 4:38 a.m.
Please send me your process spec and the CSV file with the data that
fails to import. Otherwise I can not find out whats going wrong.


miwalkerwrote:
On 08.01.2010 7:52, miwalker wrote:
miwalkerwrote:
How do we specify the Work Item Type (i.e Defect, Story,
Impedement)
when importing Work Items?

Currently it's migrating them all to Defect, I assume because
that's
the first Work Item Type listed. I'm migrating from a different
tool
into RTC.

I added the line below to my XML import file for the targetId, but
all Work Items still get imported as Defects. In my CSV file the
column that specifies the Work Item Type is named TYPE.



targetId="com.ibm.team.workitem.workitemtype"/>targetId="com.ibm.team.workitem.workitemtype"/>


Another issue I'm having:

Fields I have that are multi-select checkbox or Boolean fields with
checkboxes don't seem to have the data migrated. Fields that are
drop-down seem to show the migrated data fine.

Are there any known-issues with these types of field?


Use a column named "Type" to set the type of the work item.
Every type
is supported that exists in the project area. To get an idea of the
field values I suggest doing a CSV export of some work items from this

project area. Usually the value maps with the name of the type (e.g.
"Defect", "Story", etc...)

@checkbox fields: You say you export these as CSV from RTC and they
dont
get imported properly? Can you give an example of how the exported
data
looks like? I suggest opening a work item for this case, it would be
interesting to know if only the import fails, or if the exported data
is
already missing information.


permanent link
Michael Walker (99215201157) | answered Jan 09 '10, 2:58 a.m.
On 08.01.2010 7:52, miwalker wrote:
miwalkerwrote:
How do we specify the Work Item Type (i.e Defect, Story, Impedement)
when importing Work Items?

Currently it's migrating them all to Defect, I assume because that's
the first Work Item Type listed. I'm migrating from a different tool
into RTC.

I added the line below to my XML import file for the targetId, but
all Work Items still get imported as Defects. In my CSV file the
column that specifies the Work Item Type is named TYPE.


targetId="com.ibm.team.workitem.workitemtype"/>targetId="com.ibm.team.workitem.workitemtype"/>


Another issue I'm having:

Fields I have that are multi-select checkbox or Boolean fields with
checkboxes don't seem to have the data migrated. Fields that are
drop-down seem to show the migrated data fine.

Are there any known-issues with these types of field?


Use a column named "Type" to set the type of the work item. Every type
is supported that exists in the project area. To get an idea of the
field values I suggest doing a CSV export of some work items from this
project area. Usually the value maps with the name of the type (e.g.
"Defect", "Story", etc...)

@checkbox fields: You say you export these as CSV from RTC and they dont
get imported properly? Can you give an example of how the exported data
looks like? I suggest opening a work item for this case, it would be
interesting to know if only the import fails, or if the exported data is
already missing information.


--
Benjamin Pasero
Work Item & UI Commons Team


Ben,

Thanks for the response.

I'm actually migrating data from an Internal IBM tool to RTC. Since some of the data needs to be modified to fit the values in RTC I've been creating my own XML Data Mapping, which I'm guessing is where the problem lies.




1. I exported a work item from RTC as you suggested and in the CSV file the TYPE = APAR. I have this defined the same way in my CSV file that I'm importing but it still appears as a Defect in RTC after Import.

In the XML mapping file I have it listed like this:

<attribute>

Note: The column name in the source is TYPE.

Am I listing this correctly in the XML file?




2. I was able to get the checkboxes linked to Boolean fields working. The problem was the source treats the value as Yes/No where RTC uses True/False. When I changed the CSV value from Yes to True the check appeared after migration.




3 When I import the current Status of the imported record it's not translating to the RTC Status in the workflow.

I'm entering it in the XML mapping like this:

<attribute>
<value>
<value>
<value>
<value>
<value>
<value>



However when I view in RTC after import it goes directly to the "open" state.

The Workflow Definition in the RTC Config source looks like this:

<workflowDefinition>
<workflow>
<resolution>
<resolution>
<resolution>
<resolution>
<action>
<action>
<action>
<resolution>
<resolution>
<resolution>
<resolution>
</action>
<action>
<action>
<action>
<action>
<action>
<action>
<action>
<action>
<state>

Again I'm guessing I'm not doing the mappings correctly?





4. On other fields in my XML mapping file it's importing into RTC but with the source value and not the RTC value I want it to show. Example:

<attribute>
<value>
<value>



in the RTC Config Source:

<enumeration>
<literal>
<literal>
<literal>
<literal>
<literal>
<literal>
</enumeration>



The field name is db2_release_found but the enumeration is DB2_Release...although it seems to fail with both. By failing I mean it's storing the value as db2810 rather than the v8 NFM value I want for RTC.



Sorry for the long respons, but any advice you could give on these questions would be appreciated.



I got #4 working now. I was closing the Attribute tag too early.

I still can't get the Type or Status migration to work.

permanent link
Michael Walker (99215201157) | answered Jan 08 '10, 2:19 p.m.
On 08.01.2010 7:52, miwalker wrote:
miwalkerwrote:
How do we specify the Work Item Type (i.e Defect, Story, Impedement)
when importing Work Items?

Currently it's migrating them all to Defect, I assume because that's
the first Work Item Type listed. I'm migrating from a different tool
into RTC.

I added the line below to my XML import file for the targetId, but
all Work Items still get imported as Defects. In my CSV file the
column that specifies the Work Item Type is named TYPE.


targetId="com.ibm.team.workitem.workitemtype"/>targetId="com.ibm.team.workitem.workitemtype"/>


Another issue I'm having:

Fields I have that are multi-select checkbox or Boolean fields with
checkboxes don't seem to have the data migrated. Fields that are
drop-down seem to show the migrated data fine.

Are there any known-issues with these types of field?


Use a column named "Type" to set the type of the work item. Every type
is supported that exists in the project area. To get an idea of the
field values I suggest doing a CSV export of some work items from this
project area. Usually the value maps with the name of the type (e.g.
"Defect", "Story", etc...)

@checkbox fields: You say you export these as CSV from RTC and they dont
get imported properly? Can you give an example of how the exported data
looks like? I suggest opening a work item for this case, it would be
interesting to know if only the import fails, or if the exported data is
already missing information.


--
Benjamin Pasero
Work Item & UI Commons Team


Ben,

Thanks for the response.

I'm actually migrating data from an Internal IBM tool to RTC. Since some of the data needs to be modified to fit the values in RTC I've been creating my own XML Data Mapping, which I'm guessing is where the problem lies.




1. I exported a work item from RTC as you suggested and in the CSV file the TYPE = APAR. I have this defined the same way in my CSV file that I'm importing but it still appears as a Defect in RTC after Import.

In the XML mapping file I have it listed like this:

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

Note: The column name in the source is TYPE.

Am I listing this correctly in the XML file?




2. I was able to get the checkboxes linked to Boolean fields working. The problem was the source treats the value as Yes/No where RTC uses True/False. When I changed the CSV value from Yes to True the check appeared after migration.




3 When I import the current Status of the imported record it's not translating to the RTC Status in the workflow.

I'm entering it in the XML mapping like this:

<attribute sourceId="COMPNAME" targetId="com.ibm.team.workitem.configuration.workflow">
<value sourceId="db2admin_apar_c/f" targetId="Code Fix"/>
<value sourceId="db2objcomp_apar_c/f" targetId="Code Fix"/>
<value sourceId="db2admin_apar_b/a" targetId="Build APAR"/>
<value sourceId="db2admin_apar_t/a" targetId="Test APAR"/>
<value sourceId="db2admin_apar_rb/a" targetId="RegBuild APAR"/>
<value sourceId="db2admin_apar_rt/a" targetId="RegTest APAR"/>



However when I view in RTC after import it goes directly to the "open" state.

The Workflow Definition in the RTC Config source looks like this:

<workflowDefinition id="APAR">
<workflow startActionId="APAR.action.a5">
<resolution icon="processattachment:/workflow/duplicate.gif" id="APAR.resolution.r2" name="Duplicate"/>
<resolution icon="processattachment:/workflow/reiterate.gif" id="APAR.resolution.r3" name="Fixed in Next Release"/>
<resolution icon="processattachment:/workflow/unconfigure.gif" id="APAR.resolution.r4" name="Working as Designed"/>
<resolution icon="processattachment:/workflow/close2.gif" id="APAR.resolution.r1" name="Delivered"/>
<action id="APAR.action.a8" name="RegBuild APAR" state="APAR.state.s8"/>
<action id="APAR.action.a7" name="Forward Fit" state="APAR.state.s7"/>
<action id="APAR.action.a11" name="Test PTF" state="APAR.state.s11">
<resolution id="APAR.resolution.r1"/>
<resolution id="APAR.resolution.r2"/>
<resolution id="APAR.resolution.r3"/>
<resolution id="APAR.resolution.r4"/>
</action>
<action id="APAR.action.a10" name="Test APAR" state="APAR.state.s10"/>
<action id="APAR.action.a9" name="RegTest APAR" state="APAR.state.s9"/>
<action id="APAR.action.a1" name="Build APAR" state="APAR.state.s1"/>
<action id="APAR.action.a2" name="Build PTF" state="APAR.state.s2"/>
<action id="APAR.action.a5" name="Code Fix" state="APAR.state.s5"/>
<action id="APAR.action.a6" name="Complete" state="APAR.state.s6"/>
<action id="APAR.action.a3" name="Cancel" state="APAR.state.s3"/>
<action id="APAR.action.a4" name="Close PTF" state="APAR.state.s4"/>
<state group="inprogress" icon="processattachment:/workflow/open.gif" id="APAR.state.s1" name="Build APAR" showResolution="false">

Again I'm guessing I'm not doing the mappings correctly?





4. On other fields in my XML mapping file it's importing into RTC but with the source value and not the RTC value I want it to show. Example:

<attribute sourceId="DB2RELEASE" targetId="db2_release_found"/>
<value sourceId="db2810" targetId="DB2_Release.literal.l1"/>
<value sourceId="db2910" targetId="DB2_Release.literal.l4"/>



in the RTC Config Source:

<enumeration attributeTypeId="DB2_Release">
<literal id="DB2_Release.literal.l1" name="v8 NFM"/>
<literal id="DB2_Release.literal.l2" name="v9 Compat"/>
<literal id="DB2_Release.literal.l3" name="v9 ENFM"/>
<literal id="DB2_Release.literal.l4" name="v9 NFM"/>
<literal id="DB2_Release.literal.l5" name="v10 Conversion"/>
<literal id="DB2_Release.literal.l6" name="v10 NFM"/>
</enumeration>



The field name is db2_release_found but the enumeration is DB2_Release...although it seems to fail with both. By failing I mean it's storing the value as db2810 rather than the v8 NFM value I want for RTC.



Sorry for the long respons, but any advice you could give on these questions would be appreciated.

permanent link
Work Item & UI Commons Team (1.3k1) | answered Jan 08 '10, 7:08 a.m.
On 08.01.2010 7:52, miwalker wrote:
miwalkerwrote:
How do we specify the Work Item Type (i.e Defect, Story, Impedement)
when importing Work Items?

Currently it's migrating them all to Defect, I assume because that's
the first Work Item Type listed. I'm migrating from a different tool
into RTC.

I added the line below to my XML import file for the targetId, but
all Work Items still get imported as Defects. In my CSV file the
column that specifies the Work Item Type is named TYPE.


targetId="com.ibm.team.workitem.workitemtype"/>targetId="com.ibm.team.workitem.workitemtype"/>


Another issue I'm having:

Fields I have that are multi-select checkbox or Boolean fields with
checkboxes don't seem to have the data migrated. Fields that are
drop-down seem to show the migrated data fine.

Are there any known-issues with these types of field?


Use a column named "Type" to set the type of the work item. Every type
is supported that exists in the project area. To get an idea of the
field values I suggest doing a CSV export of some work items from this
project area. Usually the value maps with the name of the type (e.g.
"Defect", "Story", etc...)

@checkbox fields: You say you export these as CSV from RTC and they dont
get imported properly? Can you give an example of how the exported data
looks like? I suggest opening a work item for this case, it would be
interesting to know if only the import fails, or if the exported data is
already missing information.


--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
Michael Walker (99215201157) | answered Jan 08 '10, 1:50 a.m.
How do we specify the Work Item Type (i.e Defect, Story, Impedement) when importing Work Items?

Currently it's migrating them all to Defect, I assume because that's the first Work Item Type listed. I'm migrating from a different tool into RTC.

I added the line below to my XML import file for the targetId, but all Work Items still get imported as Defects. In my CSV file the column that specifies the Work Item Type is named TYPE.

targetId="com.ibm.team.workitem.workitemtype"/>


Another issue I'm having:

Fields I have that are multi-select checkbox or Boolean fields with checkboxes don't seem to have the data migrated. Fields that are drop-down seem to show the migrated data fine.

Are there any known-issues with these types of field?

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.