It's all about the answers!

Ask a question

Multiple Links created on Application Side.


Chaithra Komath (111) | asked Mar 15, 1:37 a.m.

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

                                linkServiceLibrary.saveLink(link);
But on multiple saves, multiple links are created at the application side. But no issues in Change Request.
Change Request ------------------------------> Application
                                "ContributesTo"


Application-----------------------------> ChangeRequest
                          "Tracks"

One answer



permanent link
Ralph Schoon (63.4k33646) | answered Mar 15, 3:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 15, 3:27 a.m.

 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.

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.