It's all about the answers!

Ask a question

How to get Associated Work Items from a Change Set using RTC SDK?

Leonardo Marzo (24964852) | asked May 29 '14, 9:46 a.m.

I need to know how to get the associated workitems from a change set using the RTC SDK. This article shows a solution that could work, however that solution uses an internal class, ServerProviderFactory (and we should avoid using internal classes since those could change in next releases). 

Is there any alternative for this without using internal classes? 

I´ll appreciate your help. 

Thank you, 

Leonardo Marzo commented May 30 '14, 8:30 a.m.


sam detweiler commented May 30 '14, 10:11 a.m.

I'm not aware of any other method to get the links from a changeset

Accepted answer

permanent link
Arne Bister (2.6k12832) | answered Jun 25 '14, 2:05 p.m.
edited Jun 25 '14, 2:06 p.m.
you mentioned ServerProviderFactory so it seems you are looking for Server side code?
Too bad, I only have a Client side example working for me, but it is using only non-internal SDK parts, maybe you can get something similar working on the server?

List<ILink> links
links = ChangeSetLinks.findLinks((ProviderFactory) teamRepository.getClientLibrary(ProviderFactory.class), changeSetHandle, new String[] { ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID }, monitor);

            for (final ILink link : links) {
                final Object resolved = link.getTargetRef().resolve();
                if (resolved instanceof IWorkItemHandle) {
                            // do something with the linked work item

If this answers your question, please mark this as accepted.
- Arne
Leonardo Marzo 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.