It's all about the answers!

Ask a question

data object server affinity, question

sam detweiler (12.4k6182201) | asked Dec 17 '13, 5:58 p.m.
 so I have a general question.

I am developing tools to help move projects between servers (gotta do it)..

if I 'get' objects from server 1, can I 'put' them to server 2 as is? 

Contributor IRoles[]

will the 'save' api handle adjustments of internal data items?

when I 'new' and object, I don't  give it server affinity prior to save.

currently I make duplicate objects (new) and copy over the salient elements. (hoping I don't miss something).

One answer

permanent link
Ralph Schoon (58.7k23642) | answered Dec 18 '13, 7:15 a.m.
Hi Sam,

when I used the API, I was not able to just use the handle or complex object from one server on another server.
You can just use the same data for things like Strings or Int, because this is just a value.

For complex items e.g. users, timelines, iterations and the like I had to find the related object on the other server and use the handle to the remote object in the write. This is similar to CSV import, where RTC has to match iterations by ID's (or names).

An example: Owner of a work item. Get the ID or name or whatever is the mapping from the source data. Find the user in the target system e.g. by looking up its ID and set the value found in the remote object.

For work items, you also have to care for the links and have to run a second pass to recreate the work item links (and CLM links). So you have to create some method to be able to
- Identify which work item maps to which target work item (numbers might be different)
- Recreate the original link on the new work item
- potentially delete the old link on the original work item, e.g. to RRC or other CLM links.
- You have to download (and later upload attachments).

Because it is that hard (I am not even talking about recreation of the history), and you have to do this for every metadata object, a project move is very hard to implement.


Ralph Schoon commented Dec 18 '13, 7:17 a.m.

Please be aware that there might be methods in EMF that might make things easier, but I just don't know enough to judge if that is the case.

sam detweiler commented Dec 18 '13, 8:12 a.m.

Thanks Ralph. I understand the difficulty,

I knew that handles were not replicable. it was after I did a fetch (full profile).. of an object from server 1, what are the odds that I could write it unchanged to server 2.

as I look over the objects i think the answer 'depends' on the complexity of the item. 

In my new job, we are collapsing the multiple 'officially unsupported' environments to a production platform. There are a few RTC environments included in that.
Luckily the data is relatively small (<10,000 workitems, only a few gig of source), but 400 plans, 20 teams, 50 iterations, ... and because of the server mismatch (3.0.x for current, to 4.0.x for production), I can't move the source easliy. DSCM works fine between matching versions.   and I can't upgrade them in place.

I've been there on the link recreation.. that is 'easy' compared to this project container goo (timelines, iterations, users, teams, categories, plans). 

Your answer

Register or to post your answer.