Is it possible to move workitems from one Project Area (on server A) to another Project Area (on server b)
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?
Accepted answer
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.
3 other answers
Have you tried using the File Export / Import feature? http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m5/topic/com.ibm.team.workitem.doc/topics/t_exporting_work_items.html
Comments
This handles attributes fairly well, but loses out things such as attachments, links, and approvals.
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").
Millard
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)
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.
---Moved to answer below
Probably depends on how many of these you need to move and if you have links/attachments/approvals that also need to go.
Comments
Thanks, are there any samples available? Where can I find the documentation for the API?
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.
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.
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
do you use the syncronizer interface between the repositories?
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
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.
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.
Comments
sam detweiler
Nov 18 '13, 5:09 p.m.No. This is a long standing enhancement request