It's all about the answers!

Ask a question

How to upgrade existing workitems from CSV file?


Krzysztof Kaźmierczyk (7.4k34693) | asked Sep 24 '13, 12:23 p.m.
Hello,
My case is following:

I have external database which I would like to synchronize with RTC. The database has a key which can be used as primary key.

I decided that the easiest way will be simply exporting database to csv and then importing to RTC.

Anyway I would like to periodically import work items. My issue is that I would like to avoiding the same work item twice. What are the options I should set?

Here is the header of my csv file:

Type";"Name";"Id"
"Customer";"Krzysztof Kazmierczyk";"9492"


where 9492 is any unique key from RTC.
But when I try updating workitem I got following error:

The CSV file is missing a proper identifier attribute "Id". The desired work item cannot be retrieved.

How can I make it working?

Accepted answer


permanent link
Eric Jodet (6.3k5100120) | answered Sep 25 '13, 2:40 a.m.
JAZZ DEVELOPER
 Verified using RTC 4.0.4 - modified summary on CSV Import
1 - export as CSV
2 - edit CSV file and modify some summaries - save
3 - CSV import
--> summaries are modified as expected

CSV content (tab separated):
"Type" "Id" "Status" "Priority" "Severity" "Summary" "Owned By" "Created By"
"Task" "90" "New" "Unassigned" "Normal" "modified on CSV import" "Eric JODET" "Eric JODET"
"Task" "91" "New" "Unassigned" "Normal" "modified on CSV import" "Eric JODET" "Eric JODET"
"Task" "92" "New" "Unassigned" "Normal" "modified on CSV import" "Eric JODET" "Eric JODET"
"Task" "93" "New" "Unassigned" "Normal" "Define categories and releases for work items" "Eric JODET" "Eric JODET"
"Task" "94" "New" "Unassigned" "Normal" "Define team members" "Eric JODET" "Eric JODET"
"Task" "95" "New" "Unassigned" "Normal" "Define permissions" "Eric JODET" "Eric JODET"
Krzysztof Kaźmierczyk selected this answer as the correct answer

Comments
Krzysztof Kaźmierczyk commented Sep 25 '13, 5:18 a.m.

Hi Eric and Millard,
Do you have already work item with Id 90 in your RTC? My concern is that I have external ids different than RTC Id and I would like to use that externals.

Is that possible?


1
Eric Jodet commented Sep 25 '13, 5:26 a.m.
JAZZ DEVELOPER

 yes.

If external ID is different from [internal] RTC ID,
then you should use a mapping file to do ID mapping.

Eric

2 other answers



permanent link
Millard Ellingsworth (2.5k12431) | answered Sep 24 '13, 7:55 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
A couple questions: 
1. Did you copy the header in correctly? Should the first line begin with a "?
2. When importing, did you set the separator as a semi-colon rather than a comma -- the data displayed above is not comma separated.

According to this article, it should work fine if all is configured properly. I did a quick export from the Web UI that looks like this -- it defaulted to tab-separated (truncated for clarity):
"Type"  "Id"     "Status"   "Priority"         "Severity"  "Summary"
"Task"  "104"  "New"      "Unassigned"  "Normal"    "Define a new build"
I changed the Task entry to:
"Task"  "104"  "New"      "High"              "Normal"    "Define a better build"
and it imported fine. So I'd check your separators and the quoting in your header.

permanent link
Eric Jodet (6.3k5100120) | answered Sep 25 '13, 1:14 a.m.
JAZZ DEVELOPER
 Hey Krzys,
as per CSV Import / Export reference article - https://jazz.net/library/article/69
To update existing Work Items, add a column named 'Id' with the respective Id of the Work Item to update

So assume this should work - possibly, the id column must be the first one in the CSV file.

Eric.

Your answer


Register or to post your answer.