It's all about the answers!

Ask a question

Unable to import status/state from CSV file


Tim Feeney (30745745) | asked Aug 03 '09, 5:40 p.m.
JAZZ DEVELOPER
I imported several task work items from CSV. The mapping file includes entries for mapping the Status attribute. Each time I import new or updated work items, the status field doesn't get changed. It only gets the initial state value. Other fields get updated. New work items are otherwise created properly. Shouldn't I be able to import/update the status attribute? The work item is defined by the task work item type category but is bound to a new custom task workflow.

Here's the XML snippet showing the status mapping

<attribute sourceId="Status" targetId="com.ibm.team.workitem.attribute.state">
<value sourceId="Code Complete" targetId="Code Complete"/>
<value sourceId="DDCUT Complete" targetId="DDCUT Complete"/>
<value sourceId="Not Started" targetId="Not Started"/>
<value sourceId="Removed" targetId="Removed"/>
<value sourceId="Started" targetId="Started"/>
<value sourceId="SWIT Ready" targetId="SWIT Ready"/>
</attribute>

5 answers



permanent link
Work Item & UI Commons Team (1.3k1) | answered Aug 04 '09, 4:46 a.m.
tfeeney wrote:
I imported several task work items from CSV. The mapping file
includes entries for mapping the Status attribute. Each time I
import new or updated work items, the status field doesn't get
changed. It only gets the initial state value. Other fields get
updated. New work items are otherwise created properly. Shouldn't I
be able to import/update the status attribute? The work item is
defined by the task work item type category but is bound to a new
custom task workflow.

Here's the XML snippet showing the status mapping

<attribute sourceId="Status"
targetId="com.ibm.team.workitem.attribute.state"
<value sourceId="Code Complete" targetId="Code
Complete"/
<value sourceId="DDCUT Complete" targetId="DDCUT
Complete"/
<value sourceId="Not Started" targetId="Not
Started"/
<value sourceId="Removed"
targetId="Removed"/
<value sourceId="Started"
targetId="Started"/
<value sourceId="SWIT Ready" targetId="SWIT
Ready"/
</attribute


This should work. I suggest you try using the ID of the status in the
mapping file instead of the actual name. You can lookup the IDs from the
process configuration. See http://jazz.net/library/technote/69 for more
details on this. Does that help?

--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
Tim Feeney (30745745) | answered Aug 04 '09, 4:14 p.m.
JAZZ DEVELOPER
tfeeney wrote:
I imported several task work items from CSV. The mapping file
includes entries for mapping the Status attribute. Each time I
import new or updated work items, the status field doesn't get
changed. It only gets the initial state value. Other fields get
updated. New work items are otherwise created properly. Shouldn't I
be able to import/update the status attribute? The work item is
defined by the task work item type category but is bound to a new
custom task workflow.

Here's the XML snippet showing the status mapping

<attribute sourceId="Status"
targetId="com.ibm.team.workitem.attribute.state"
<value sourceId="Code Complete" targetId="Code
Complete"/
<value sourceId="DDCUT Complete" targetId="DDCUT
Complete"/
<value sourceId="Not Started" targetId="Not
Started"/
<value sourceId="Removed"
targetId="Removed"/
<value sourceId="Started"
targetId="Started"/
<value sourceId="SWIT Ready" targetId="SWIT
Ready"/
</attribute


This should work. I suggest you try using the ID of the status in the
mapping file instead of the actual name. You can lookup the IDs from the
process configuration. See http://jazz.net/library/technote/69 for more
details on this. Does that help?

--
Benjamin Pasero
Work Item & UI Commons Team

I tried the following and it didn't work. I've tried it with and without the leading 's' in the latter part of the id, e.g. 's1' vs '1'.

<attribute sourceId="Status" targetId="com.ibm.team.workitem.attribute.state">
<value sourceId="Code Complete" targetId="featureWorkflow.state.3"/>
<value sourceId="DDCUT Complete" targetId="featureWorkflow.state.4"/>
<value sourceId="Not Started" targetId="featureWorkflow.state.1"/>
<value sourceId="Removed" targetId="featureWorkflow.state.7"/>
<value sourceId="Started" targetId="featureWorkflow.state.2"/>
<value sourceId="SWIT Ready" targetId="featureWorkflow.state.5"/>
</attribute>

permanent link
Work Item & UI Commons Team (1.3k1) | answered Aug 05 '09, 4:46 a.m.
Would you be able to send me the process spec XML so that I can try to
reproduce? Also, the mapping and CSV file you tried.

Thanks!

tfeeney wrote:
bpaserowrote:
tfeeney wrote:
I imported several task work items from CSV. The mapping file
includes entries for mapping the Status attribute. Each time I
import new or updated work items, the status field doesn't get
changed. It only gets the initial state value. Other fields get
updated. New work items are otherwise created properly. Shouldn't
I
be able to import/update the status attribute? The work item is
defined by the task work item type category but is bound to a new
custom task workflow.

Here's the XML snippet showing the status mapping

<attribute sourceId="Status"
targetId="com.ibm.team.workitem.attribute.state"
<value sourceId="Code Complete" targetId="Code
Complete"/
<value sourceId="DDCUT Complete"
targetId="DDCUT
Complete"/
<value sourceId="Not Started" targetId="Not
Started"/
<value sourceId="Removed"
targetId="Removed"/
<value sourceId="Started"
targetId="Started"/
<value sourceId="SWIT Ready" targetId="SWIT
Ready"/
</attribute


This should work. I suggest you try using the ID of the status in the

mapping file instead of the actual name. You can lookup the IDs from
the
process configuration. See http://jazz.net/library/technote/69 for
more
details on this. Does that help?



--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
Tim Feeney (30745745) | answered Aug 05 '09, 10:30 a.m.
JAZZ DEVELOPER
This has been resolved. Per offline discussion with Benjamin, I needn't have used a custom mapping file. Using the default mapping from RTC worked just fine.

permanent link
Frank Schophuizen (21823226) | answered Feb 19 '14, 10:34 a.m.
I have the same issue:
When using a custom mapping file, the Status and the Type of work items cannot be updated with a CSV import.

When re-importing a CSV file from another bug tracking system, I need to inject the RTC work item Id in the CSV file. Then, I have to use the custom mapping to update attributes like Priority and Severity, but not Status and Type. Next, I need to remove the fields I already imported from the CSV file, change the Status and Type values in the CSV file to match RTC and re-import the CSV file without using custom mapping.

Why can't we import Status and Type for existing work items with custom mapping?


Comments
sam detweiler commented Feb 19 '14, 10:42 a.m.

I am importing everything all at once, no issues.. (other than custom fields not bneing completely finished).


if there is NO field in the mapping file, the data will NOT be imported


Frank Schophuizen commented Feb 19 '14, 11:04 a.m. | edited Feb 19 '14, 11:04 a.m.

If you mean you create new work items with custom mapping, then I agree. That works for all attributes, including Status and Type (although for Type I am not 100% sure).

But my problem is to update existing work items with a CSV file with custom mapping. That works for all attributes (as far as I can see) except for the Status and Type.


Frank Schophuizen commented Feb 19 '14, 11:23 a.m.

I checked quickly: creating new work items with custom mapping sets Type to Defect, regardless of the mapping in the customer mapping file. The Status is indeed correctly mapped and imported (for new work items) when using customer mapping.

Type mapping in my custom mapping file:
    <attribute sourceId="type" targetId="Type">
        <value sourceId="CR" targetId="Story"/>
        <value sourceId="PR" targetId="Defect"/>
        <value sourceId="Task" targetId="Task"/>
    </attribute>


sam detweiler commented Feb 19 '14, 11:31 a.m.

My NEW workitem create import is 3 pass.. 


defects
storys
everything else  (task, epic, ...)

all works ok.  I don't know if u can change the type via import. (update)


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.