It's all about the answers!

Ask a question

List of work items and their parents via SCM

Reed Pny (1122) | asked Jun 07 '16, 3:25 p.m.

I create a list of work items via scm compare between two snapshots:

$ scm compare snapshot 3032 snapshot 2771 -I w
Work Item 111: Allow defining permissions for project and team areas in the Web UI
Work Item 222: Set up some sort of Jazz Foundation build
Work Item 333: TCT031b: Jazz Translations - more variables

The point is, how can I get parent IDs of the listed work items in the command line with SCM?

For example, how can I get the parent id of the work item 111 via SCM?

Accepted answer

permanent link
Shashikant Padur (4.2k27) | answered Jun 07 '16, 11:07 p.m.
edited Jun 07 '16, 11:08 p.m.
I believe you want to find the parent workitem of the listed workitem(s). Scm command line only deals with scm artifacts and although it lists the workitems associated with a change set it does not have any commands to perform operation on a workitem. You have to write a script and use the Workitem api's to get this information.
Ralph Schoon selected this answer as the correct answer

Reed Pny commented Jun 08 '16, 7:37 a.m.

Thank you for this information. Do you know where can I find a tutorial how to use the Workitem api with a simple example?

Ralph Schoon commented Jun 08 '16, 8:36 a.m. | edited Jun 08 '16, 8:37 a.m.

For extending and automation using the Java APi start here:
Follow the information how to get started. There are numerous Work Item API examples available.

Also see for a first glimpse at the work item API. 

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.