It's all about the answers!

Ask a question

how to export defect along with attachments and Comments


shashikant Sabnekar (21234) | asked Feb 12 '13, 7:30 a.m.
Hi I need to export defects from RQM along with Comments and Attachments.
I need this for defect in RQM 2.0 and RQM3.0 versions. Please help.

3 answers



permanent link
Ralph Schoon (63.1k33646) | answered Feb 12 '13, 2:50 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 There is no built in capability. For RTC I know of this method:

In the past that API worked for RQM as well. I think in 3.x there was a restriction. You could try a mix between CSV export and API usage.

Comments
Tracy Harris commented Apr 04 '13, 11:08 a.m. | edited Jan 18 '16, 6:26 p.m.

Really guys, why doesn't RTC have an ability to export comments.
Please, can we have this capability ?


Ralph Schoon commented Apr 05 '13, 2:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As answered on the other question:

You can export comments (not discussions though) using the Eclipse client (it does not work in the Web UI and you can not yet display comments or discussions as columns in queries).

Use File>Export
Select Team>Work Items and click next
Select a query and click next
Select Add Columns search for comments and add other columns and click finish.


Tom Valesky commented Dec 07 '15, 9:21 a.m. | edited Jan 18 '16, 6:26 p.m.

Thanks for the clarification. I was able to get your command-line app set up. However, it's currently dying with this exception:


C:\tvalesky\jazz.command.line\WCL_V3.2_20151120\WCL>c:\Progra~1\java\jdk1.8.0_05
\jre\bin\java -Djava.security.policy=rmi_no.policy -Djava.ext.dirs=./lib;C:\tval
esky\jazz.command.line\RTC-Client-plainJavaLib-3.0.1;c:\Progra~1\java\jdk1.8.0_0
5/jre/lib/ext -cp ./lib;C:\tvalesky\jazz.command.line\RTC-Client-plainJavaLib-3.
0.1 -jar wcl.jar
WorkItemCommandLine Version V3.2

Starting Team Platform ...
Error: Command not provided!
Exception in thread "main" java.lang.NullPointerException
        at com.ibm.js.team.workitem.commandline.utils.ReferenceUtil.getCLM_WI_En
dPointDescriptorMap(ReferenceUtil.java:215)
        at com.ibm.js.team.workitem.commandline.helper.WorkItemUpdateHelper.help
UsageCLMWorkItemLink(WorkItemUpdateHelper.java:3572)
        at com.ibm.js.team.workitem.commandline.helper.WorkItemUpdateHelper.help
UsageAllLinks(WorkItemUpdateHelper.java:3520)
        at com.ibm.js.team.workitem.commandline.helper.WorkItemUpdateHelper.help
GeneralUsage(WorkItemUpdateHelper.java:3183)
        at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.helpGeneralU
sage(WorkitemCommandLine.java:493)
        at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.runCommands(
WorkitemCommandLine.java:267)
        at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.run(Workitem
CommandLine.java:224)
        at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.main(Workite
mCommandLine.java:174)


Ralph Schoon commented Dec 07 '15, 9:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

there is no command provided but there is probably an issue with the API. I have tested it with 4.x up to 6.x. I have no time to look at 3.x in the near future.


Ralph Schoon commented Dec 07 '15, 9:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Use the Java that comes with RTC as documented. This is likely a Java problem because you use 1.8.


Tom Valesky commented Dec 07 '15, 9:45 a.m. | edited Jan 18 '16, 6:29 p.m.
Switched java_home to the Team Concert JDK. Now I'm getting an UnsupportedClassVersionError




 C:\tvalesky\jazz.command.line\WCL_V3.2_20151120\WCL>set JAVA_HOME=C:\Progra~1\IB

M\TeamConcert\jdk

C:\tvalesky\jazz.command.line\WCL_V3.2_20151120\WCL>set PLAIN_JAVA=C:\tvalesky\j
azz.command.line\RTC-Client-plainJavaLib-3.0.1

C:\tvalesky\jazz.command.line\WCL_V3.2_20151120\WCL>C:\Progra~1\IBM\TeamConcert\
jdk\jre\bin\java -Djava.security.policy=rmi_no.policy -Djava.ext.dirs=./lib;C:\t
valesky\jazz.command.line\RTC-Client-plainJavaLib-3.0.1;C:\Progra~1\IBM\TeamConc
ert\jdk/jre/lib/ext -cp ./lib;C:\tvalesky\jazz.command.line\RTC-Client-plainJava
Lib-3.0.1 -jar wcl.jar
The java class could not be loaded. java.lang.UnsupportedClassVersionError: (com
/ibm/js/team/workitem/commandline/WorkitemCommandLine) bad major version at offs
et=6

C:\tvalesky\jazz.command.line\WCL_V3.2_20151120\WCL>

showing 5 of 6 show 1 more comments

permanent link
Paul Slauenwhite (8.4k12) | answered Feb 13 '13, 6:46 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
For RQM, see the RQM Reportable API.

permanent link
Vladimir Amelin (70472226) | answered Mar 25 '14, 10:52 a.m.
 We've written simple batch script using CURL and XML command-line parser to download attachments.

Comments
Tom Valesky commented Dec 04 '15, 4:22 p.m. | edited Jan 18 '16, 6:24 p.m.
   Vladimir, 
Would you mind posting that script? 

Ralph Schoon commented Dec 07 '15, 1:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Tom Valesky commented Dec 07 '15, 7:43 a.m. | edited Dec 07 '15, 8:08 a.m.

 Ralph, I tried that first; I ran into a dead end when Installation Manager wouldn't recognize the version 3.0.1.5 repository as a repository. So the idea of using an external script is appealing.


Ralph Schoon commented Dec 07 '15, 8:10 a.m. | edited Dec 07 '15, 8:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't understand why you think you need an Installation manager. All parts (SDK, Plain Java client libraries, RTC Eclipse client) should be downloadable as plain zip files.
I have not tested with such an old version, so you would have to check if there are API changes.

Any external tool "script" would have to use the Plain java client libraries to get to the data. There is no official http method to download the attachments.


Tom Valesky commented Dec 07 '15, 8:19 a.m. | edited Jan 18 '16, 6:25 p.m.

Ralph Schoon commented Dec 07 '15, 8:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You don't have to install the SDK, if you don't want to see the code. You just need a working Eclipse (or even Java), and the Plain Java Client libraries.


The Extensions Workshop also (the newer version at least) mentions to use the zip files as an alternative. Unfortunately the packaged server for 3.x does not come with an ZIP version, however, you don't have to perform the workshop to use the WCL.  You only need to setup the Plain Java Client Libraries (unzip) and unzip the WCL. If you need to debug the WCL, you need an Eclipse client to open the source projects. It would be desirable to have the SDK set up for debugging, but it is not strictly required.
If you import the project, you might see build path errors and errors in the dependencies. You might have to fix that.

I insist the people do the extensions workshop SDK setup, because so many miss the point with being able to see the source code from the SDK. And all my code is wrapped into plugin projects that need the SDK, but you can remove that nature.


Vladimir Amelin commented Dec 08 '15, 7:58 a.m.

Sorry, can't post full script due to legal issues. But the clue is to get links and invoke download for them:

1) curl -# -k -b %COOKIES% -H "Accept: application/xml" "%HOST%/oslc/workitems/<WI_ID>/rtc_cm:com.ibm.team.workitem.linktype.attachment.attachment?oslc.properties=dc:title,rtc_cm:content"
2) Parse xml to extract attachment links and filenames
3) curl -# -k -b %COOKIES% -e %HOST% -H "Accept: application/xml" "<LINK>" ><FILENAME>


showing 5 of 7 show 2 more comments

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.