How we can fetch work item change sets using client API?
If there is any other way to find out change sets using work item Id. Please help |
Accepted answer
Ralph Schoon (63.1k●3●36●45)
| answered Mar 21 '18, 9:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Yes, you can find the work item using its ID. Then you iterate the links of that work item and finds the ones that are to a change set. Then you can identify the change set and do whatever needed with it.
https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ explains how to follow links. This is example code to find the handles for (IReference reference : references) { if (reference.isItemReference()) { IItemHandle refItem = (IItemHandle) reference.resolve(); if (refItem instanceof IChangeSetHandle) { ....(IChangeSetHandle) refItem; } } } Rinkal Garg selected this answer as the correct answer
Comments Now I have links collection with me, and I am using the below code to find change set :
Rinkal Garg
commented Mar 26 '18, 3:03 a.m.
@Ralph any suggestion? I have provided you with several links to blog posts. One of them was around the link API. As far as I remember the code there iterates over all link types and can print information. I created the code because I was not sure what to expect. Maybe you want to follow that example.
|
One other answer
arif ahnan (11)
| answered Mar 26 '18, 5:47 a.m.
edited Mar 26 '18, 5:53 a.m. by Ralph Schoon (63.1k●3●36●45) this is very helpful once thanks sir Ralph Schon |
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.