It's all about the answers!

Ask a question

programmatically create link to related artifacts


r vijay (3676) | asked Dec 13 '11, 12:32 p.m.
Hi All,

I am trying to add related artifacts (basically a url) programmatically. But when i try to create link using

ILink link= ILinkFactory.INSTANCE.createLink(WorkItemLinkTypes.RELATED_ARTIFACT, sourceRef, targetRef);
linkManager.saveLink(link, monitor);

it requires source and target reference, which i think is not applicable for related artifact.

Can anyone please help on this...Thanks

regards,
Vijay

2 answers



permanent link
r vijay (3676) | answered Dec 14 '11, 1:48 a.m.
Thanks Sam !! , it works , i am able to create related artifacts through code now..

well.. there are three objects there

the workitem (source)
the object of relatedness (uri)
and the link between them.

Sam

permanent link
sam detweiler (12.5k6195201) | answered Dec 13 '11, 11:43 p.m.
well.. there are three objects there

the workitem (source)
the object of relatedness (uri)
and the link between them.

Sam

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.