Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

 Hi, 

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, 

0 votes

Comments

Anyone? 

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


Accepted answer

Permanent link
Leonardo,
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

1 vote

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,936
× 411
× 149
× 51

Question asked: May 29 '14, 9:46 a.m.

Question was seen: 6,500 times

Last updated: Jun 25 '14, 2:06 p.m.

Confirmation Cancel Confirm