It's all about the answers!

Ask a question

how to preserve workitem external id when importing from CSV?

Krzysztof Kaźmierczyk (7.5k477103) | asked Oct 10 '13, 6:23 a.m.
It was discussed in but I have decided to create new one.

I have RTC 4.0.3.

1. I have following CSV file:

"Type";"Id";"Status";"Priority";"Severity";"Summary";"Owned By";"Created By"
"Task";"1000000";"New";"Unassigned";"Normal";"Define permissions";"admin";"admin"

Id - is identifier from external system
I use import from CSV option. After import there is created new work item number 98 (I leave Id value as 1000000)

2. I modify only summary field in CSV file
3. Use import from CSV option to import work item. Select "Update Matched Work items" option.
What is => New work item number 99 is created
What I would like to have => summary of work item number 98 is modified.

How can I acheive that? How should I modify my CSV file/importing options to achieve what I want to?

Joerg Ihle commented Mar 04 '14, 11:25 a.m. | edited Mar 04 '14, 11:52 a.m.

 Hello !

Referring to your discussion I have a similar problem: I want to import and update defects from an external system on daily basis. I'd map the external ID to a new attribute "extID" (string) and let RTC generate it's own internal ID (integer).

in the mapping.xml:
<attribute sourceId="Id" targetId="extID">

I'd expect that the import update function check the existance of the value 9999 in the attribute extID, and only if there is no match, a new defect is created ...
Unfortunately I didn't manage to get it working this way.

Is that supported at all ?


sam detweiler commented Mar 04 '14, 11:44 a.m.

No.. the only matching done for Update import is on the ID column, where the data must match existing RTC workitem IDs (unless u specify create if not found)

One answer

permanent link
Jorge Diaz (8664434) | answered Oct 10 '13, 6:36 a.m.
Hello Krzysztof,

have you tried in step "2" modifying the "Id" field as well? In your example to make it match the 98 of the previously created item. That would be the way to uniquely identify the work item you are willing to update.



Krzysztof Kaźmierczyk commented Oct 11 '13, 3:56 a.m.

hi Jorge,
This is what I exactly would like to avoid. Is there any way to do that without looking into RTC what is RTC new Id?

Jorge Diaz commented Nov 25 '13, 1:26 p.m.

Hi Krzysztof,
not as far as I know. If you don't specify the ID of matching item I don't see how the work item would be uniquely identified.

sam detweiler commented Mar 04 '14, 11:42 a.m. update, there must be a column labeled ID and the value of the rows in that column MUST be existing workitem numbers. 

I just did this for one of our imports.. we missed a field on import, but had saved the original system ID in a separate field. 

so, on the old system we exported ID and new data
and on the new system we exported ID, and Old ID,
then used Excel to merge those two sheets together.
we deleted the Old ID and old sheet ID field columns after the merge.  leaving only
ID and New Data

then the importer was told to update, not create

worked perfectly. 

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.