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

Getting change set information from a work item.

I am trying to get change set information from a work item object. I am doing the following to get attempt to get this.


ILinkManager fLinkManager = (ILinkManager) repo.getClientLibrary(ILinkManager.class);
IReferenceFactory fReferenceFactory = fLinkManager.referenceFactory();
IReference reference = fReferenceFactory.createReferenceToItem(workItem.getItemHandle());

ILinkQueryPage page = fLinkManager.findLinksByTarget("com.ibm.team.filesystem.workitems.change_set", reference, monitor);
ILinkCollection linkCollection = page.getAllLinksFromHereOn();
links = linkCollection.getLinksById("com.ibm.team.filesystem.workitems.change_set");


Is there something that I need to be doing differently? When debugging this, it looks like the page object has 5 elements in it that corresponds to the 5 change sets that are associated to the work item. But when I do the getAllLinksFromHereOn(), it returns an empty collection.

What am I doing wrong?

Thanks,
Kevin.

0 votes



4 answers

Permanent link
Is there something that I need to be doing differently? When
debugging this, it looks like the page object has 5 elements in it
that corresponds to the 5 change sets that are associated to the work
item. But when I do the getAllLinksFromHereOn(), it returns an empty
collection.

What am I doing wrong?

The LinkCollection removes all links that have an unknown link type. So
if the plugin com.ibm.team.filesystem.common.workitems (which
contributes the change set link type) is not available in your runtime,
the change set links will be filtered out.

HTH,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Thanks for the reply Patrick.

One thing that I failed to mention, which may make a difference is that I am trying to create this as a standalone java application using the using the plain java client SDK for RTC.

When I look at the jars that come with the SDK, I dont see one that maps to the com.ibm.team.filesystem.common.workitems package.

Does this make a difference? Do I need to approach this differently since I am writing this as a standalone java client?

Thanks for your help.
Kevin

0 votes


Permanent link
One thing that I failed to mention, which may make a difference is
that I am trying to create this as a standalone java application
using the using the plain java client SDK for RTC.

When I look at the jars that come with the SDK, I dont see one that
maps to the com.ibm.team.filesystem.common.workitems package.

Does this make a difference? Do I need to approach this differently
since I am writing this as a standalone java client?

What you are trying to do should also work in a plain java client. You
could try to add the missing com.ibm.team.filesystem.common.workitems
jar manually to the classpath (you can copy the jar e.g. from an RTC
client installation).

HTH,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Thanks Patrick.

That worked great.

0 votes

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,938

Question asked: Oct 12 '08, 6:30 p.m.

Question was seen: 6,992 times

Last updated: Oct 12 '08, 6:30 p.m.

Confirmation Cancel Confirm