List of work items and their parents via SCM
Hi,
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?
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
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.
Comments
Thank you for this information. Do you know where can I find a tutorial how to use the Workitem api with a simple example?
For extending and automation using the Java APi start here:
https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/
Follow the information how to get started. There are numerous Work Item API examples available.
Also see https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation for a first glimpse at the work item API.