It's all about the answers!

Ask a question

Is it possible to move workitems from one Project Area (on server A) to another Project Area (on server b)


Chris Thompson (11268) | asked Nov 18 '13, 2:34 p.m.
I have around 200 workitems in Project A on Server 1 and would like to move/copy them to a new Project B on Server 2. The workitem schema across the Project Areas is similar but not 100% identical. The workitems in Project A have links to each other and to workitems in other repositories, an RM instance and a Focal POint instance. Preservation of the links is more critical than preservation of the attributes on the workitems.

I had a look at the Eclipse move capability here but it this only seems to work if the Project Areas are on the same server.

Are there any other options?

Comments
sam detweiler commented Nov 18 '13, 5:09 p.m.

No. This is a long standing enhancement request 

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Nov 21 '13, 7:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 21 '13, 10:53 a.m.
I tried an approach with several steps.

1. Use the API to create a new work item in the target area on the other server. Just copy over the minimal data needed, mostly text and owner etc. In the process, store a reference on an additional attribute on the original work item that has the information needed to copy.

2. Run over the original work items and identify the new item. Recreate all links on the new work items. For work items it is easy to identify the new target, by following the link and look up the new copy in the extra info. For CLM links, you can just recreate those. See https://rsjazz.wordpress.com/2013/11/06/creating-clm-links-with-back-link/ and related posts.

3. You could bring over all attributes you can using CSV, again, if you use the Id as reference to the new attribute, you can easily use an CSV export.

You are missing attachments and subscriptions. See https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/ and other posts on my blog for the API. Should not be too hard and doable in step 1 or 2.

4. Implement tooling for attributes you have missed.

I spent several days on this, and I had a working prototype. I was a beginner with the APi when I tried and had literally no examples at all.

With what I know today, I would expect at least 2 weeks worth of work. I have put a lot of what I learned on my blog, so some of the stuff does not need to be reinvented.
Rosa Naranjo selected this answer as the correct answer

Comments
Chris Thompson commented Nov 29 '13, 8:23 a.m.

Thanks, given the relatively small number of workitems we needed to migrate we decided to use the csv export/import capability and then manually re-create the links.

3 other answers



permanent link
Rosa Naranjo (2.9k11723) | answered Nov 18 '13, 3:22 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Comments
Susan Hanson commented Nov 18 '13, 6:09 p.m.

This handles attributes fairly well, but loses out things such as attachments, links, and approvals.


Millard Ellingsworth commented Nov 18 '13, 6:44 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

Using a server with the JKE Banking example loaded, I was able to add links in the query output. If your new server/project area has the same relationships with the same non-CCM projects, these links may line up and work. The link seems to be by name, so I assume it will be looking for the right sort of artifact with the same name (e.g., the Story item that starts with "Story","57","Allocate Dividends by Percentage"... has a Tested By Test Case value of "Allocate Dividends by Percentage"). 


Since Export/Import is non-destructive (unlike bulk move), you should be able to safely test this. Export 1 or 2 items with links, import them on the other side and see if it all wires back up. Inspect and adapt.


Rosa Naranjo commented Nov 19 '13, 8:40 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Millard

That's is worth trying.  That's what I thought of would work when I mentioned the above recommendation 


sam detweiler commented Nov 19 '13, 8:50 a.m.

come on!.. stop giving folks false hope.

if it were that easy, IBM would have done it.   at my prior company we spent a lot of time working on tools to do this task because we got backed into a deployment corner, and were only 90% successful.  IBM has a services offering too, but our tool was significantly better.

Plan item 93151 documents the work plan for this. (not happening anytime soon)


Chris Thompson commented Nov 21 '13, 6:33 a.m.

I tried using the csv import/export. The links are exported as a text representation (without the URL information) and so cannot be imported this way.


Ralph Schoon commented Nov 21 '13, 7:06 a.m. | edited Nov 21 '13, 10:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

---Moved to answer below

showing 5 of 6 show 1 more comments

permanent link
Susan Hanson (1.6k2201194) | answered Nov 18 '13, 6:11 p.m.
You could attempt to do it programmatically .. .write something using the Java Client API that would introspect everything in the first work item and create a new work item in the new repository/project area (mapping attributes and enumerations as necessary).

Probably depends on how many of these you need to move and if you have links/attachments/approvals that also need to go.

Comments
Chris Thompson commented Nov 21 '13, 6:34 a.m.

Thanks, are there any samples available? Where can I find the documentation for the API?


Ralph Schoon commented Nov 21 '13, 6:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The JavaDoc for the Plain Java Client Libraries can be found on the download page. https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation is an example on the wiki. My blog has more and also links to others. Start here: https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/

I am not sure if this works across servers - I have never tested it, but you could look into https://jazz.net/wiki/bin/view/Main/BulkMoveWorkItemsBetweenProjectAreas I think it works only on one server.

Using the API is a lot of work - I have experimented with it. Implementing all Attribute types makes the most work. You could try CSV export and import.


sam detweiler commented Nov 21 '13, 7:24 a.m.

Unfortunately in my attempts, you cannot be connected to two repositories at the same time. thus you have to extract the data in one pass, and insert it into another pass.  to make links work you need to know what the old endpoints were and what the new ones are.  links are the easiest of the extra data.
note that you cannot link across servers except with the special chage request links.. so a link to some other (non-moved) workitem will become a problem.

until 4.0.3 you cannot 'delete' attachments. I haven't looked into the UI code to determine how this is done yet.

do you care about the workitem change history? we did. this is all kinds of fun in itself. you will NOT be able to recreate the original dates, only the order

also, workitem content is impacted by users, categories, team areas, plans, and a host of other non-workitem data.


Susan Hanson commented Nov 21 '13, 7:34 a.m.

My team has written a "bridge" between two RTC repositories such that a work item created in project area A on server A can be bridged (a new work item created in project area B on server B) and sync'd (comments and status).  so it is possible and we have one bridge running and another bridge under development.  So we read the data from one work item and then we do a work item create with the data, while connected to both repositories.  The code is very specific to the individual project area configuration and has to know both to be able to map attributes/enumeration values and the like.  We can map normal attributes, and while we sync comments, we do not use the userid of the person who made the original comment (it is added by the bridge ID although we put in the comment text the userid/email address of the original commenter).  We do not specifically move any history . just actual attributes.

I'm heading on vacation, but when I get back, I can try to clean up something and post an example.
Susan


sam detweiler commented Nov 21 '13, 7:36 a.m.

do you use the syncronizer interface between the repositories?


Susan Hanson commented Nov 21 '13, 7:41 a.m.

No, we don't. At this point, I don't even think we have them even listed as friends.  Our bridge is a plain Java application which uses the java APIs.

Susan


Ralph Schoon commented Nov 21 '13, 7:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Odd, I think I connected to two repos.I used two ITeamRepository objects. Also the repos where slightly different versions 4.0 and 4.0.1 or the like.


sam detweiler commented Nov 21 '13, 7:57 a.m.

Its been years since I tried, so maybe doing something dumb. I'll put this back on my list of things to look at sometime.

showing 5 of 8 show 3 more comments

permanent link
Dudley Thomas (41614) | answered Feb 10 '17, 8:49 a.m.

 was this example ever posted?



Comments
Geoffrey Clemm commented Feb 10 '17, 2:16 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It is unclear what "example" you are referring to.   Minimally, you will want to post this as a comment on one of the answers, not as a separate answer.

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.