It's all about the answers!

Ask a question

Migration of work items

Tomislav Klisanic (736) | asked Jun 02 '14, 4:32 a.m.
I'm trying to migrate some of work items from one RTC server to another. Is it possible to import work items and to set new id to be equal to old id? It's very important that ids are equal. Also I have comments that have links to other work items that needs to work after the migration is completed.

Thanks for your help.

Accepted answer

permanent link
Sumant Renukarya (1.1k23339) | answered Jun 02 '14, 5:51 a.m.
Hi Tomislav

Does the details in this thread help for your query here?

Tomislav Klisanic selected this answer as the correct answer

2 other answers

permanent link
sam detweiler (12.5k6195201) | answered Jun 02 '14, 6:44 a.m.
As Ajay mentions, there is no reliable way to set the ID of a newly created workitem. 

as for links, etc..  when we moved projects across servers with our custom built utilities, we had to fixup all the links, comments, etc to get them working again.. 

permanent link
Ajay Mallikarjunaiah (148410) | answered Jun 02 '14, 6:17 a.m.
Hi Tomislav..,

Theoretically, it is not possible for a developer to determine ID of the workitem.
Consider a scenario where you want to migrate workitems with ids 1- 100 from a source server to destination(assumping it is new server).
1. Create a query which lists all the work items and sort it based on ids before saving it.
2. Export it to a csv file...,
Now while importing workitems from csv, the new server will assign same ids (i.e 1-100, since it is new) for the workitems imported provided no other users are creating workitems on current server simultaneously else where.
If it is not new server(i.e workitems has already been  created), then you'll have no control over the ids of workitems that you are going import.

P.S. In import feature, client will traverse workitems present in csv file from top to bottom and assign a number which is next to id of most recently workitem.

Hope this helps in your qwest.

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.