Multiple Links created on Application Side.
I have a requirement where I want to create Links from Change Request to Application on creation of CR.So I have created afollow up action server side plugin and I have used linkService approach to create the links.
IReferenceFactory refFactory = IReferenceFactory.INSTANCE;
IReference source = refFactory
.createReferenceToItem(cRworkingCopy);
IReference target = refFactory
.createReferenceToItem(appWI
.getWorkingCopy());
// get the link service to have access to the
// ILinkServiceLibrary
ILinkService linkService = getService(ILinkService.class);
// get the ILinkServiceLibary
ILinkServiceLibrary linkServiceLibrary = (ILinkServiceLibrary) linkService
.getServiceLibrary(ILinkServiceLibrary.class);
// Create the link
ILink link = linkServiceLibrary
.createLink(
WorkItemLinkTypes.CONTRIBUTES_TO_WORK_ITEM,
source, "ContributesTo", target);
// Save the link
One answer
I am unsure what the question is. In any case the code shown is partial at best. You can try to search for "link" on https://rsjazz.wordpress.com . I have explained how to use the link APIs on clients and servers.
The keyword is Backlinks.