It's all about the answers!

Ask a question

Identify Git Commits via Jazz Plain Api


Christine Makasy (731123) | asked Nov 30 '17, 5:02 a.m.

Hello all,

I would like to list all Git commits linked to a work item.
With the following code I'm able to list links to work items as well as links to change sets, but I miss the linked git commits.

ILinkQueryPage workItemLinks2 = linkManager.findLinks(workItemRef, monitor);
            ILinkCollection links2 = workItemLinks2.getAllLinksFromHereOn();
            for(ILink l2 : links2){
                System.out.println("All Links: " + l2.getLinkTypeId() + ", ID: " + l2.getItemId());
            }

What do I have to do to list Git commits?

Many thanks in advance and kind regards,
Christine

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Nov 30 '17, 5:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I'd suggest to follow https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ and use the analyze references. There are various link types available, also as constants and you can try to find them this way. I have not found the constant so far.

Christine Makasy selected this answer as the correct answer

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.