It's all about the answers!

Ask a question

API or command line to import workitems from CSV to RTC


Marcelo Marinho (36198) | asked Dec 13 '12, 12:41 p.m.

Hi!

My customer needs to perform a massive workitem migration/creation in order to deactivate a legacy home-made change management solution.

They used a ETL tool to generate a CSV-file with the workitems for each project area. But, from this point forward they have to manually use the eclipse client  to import the CSV.

It is possible to import CSV programatically through the java API or command line?

I know they can implement a java program or a perl-curl script to do it.

But, would be safer and faster to avoid the implementation of a whole new program to do something we already have in the GUI!!

Thanks

2 answers



permanent link
Ralph Schoon (63.6k33646) | answered Dec 14 '12, 5:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can use the Plain Java API to create tooling for that, but that is going to be expensive. I try to provide some API examples here: https://rsjazz.wordpress.com/ .

You can look into using OSLC for that.

The least expensive options is probably: You can look into the SDK and have a look if you can call the import somehow from the commandline. The class you are interested in is:  com.ibm.team.workitem.rcp.ui.internal.wizards.inport.WorkItemImportWizard.





Comments
Krzysztof Kaźmierczyk commented Oct 24 '13, 7:13 a.m.

Thanks Ralph for a reply. I am building simple standalone application. My understanding of RTC SDK extends existing RTC client so I will have to add several thousands of megabytes of dependencies and make any mechinism starting RTC client just to run import tool for that. Is that correct? Or I missing something?


Ralph Schoon commented Oct 24 '13, 7:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Krysztof,

there are two versions of the client API. See http://rsjazz.wordpress.com/2013/03/14/what-apis-are-available-for-rtc-and-what-can-you-extend/ . The Plain Java Client Libraries are considerably smaller than the Client SDK and provide you with only a limited subset of the API. You can select the libraries you need to deploy as well, if you want to package everything up as small as possible.


Ralph Schoon commented Oct 24 '13, 7:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just one other comment. The Plain Java Client Libraries don't ship the client code to export to CSV. If you want to reuse the Eclipse client code, you would need the SDK and create an extension to the Eclipse client and reuse the code used in the export wizard, similar to http://jorgediazblog.wordpress.com/2013/02/06/custom-bugzilla-importer-for-non-consecutive-bug-ids/ .


permanent link
Krzysztof Kaźmierczyk (7.5k480103) | answered Oct 24 '13, 7:14 a.m.
edited Oct 24 '13, 7:16 a.m.
Here is the link to add workitem using Java API: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation and https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/

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.