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

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

                                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"

0 votes



One answer

Permanent link

 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.

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

Question asked: Mar 15 '24, 1:37 a.m.

Question was seen: 662 times

Last updated: Mar 15 '24, 3:27 a.m.

Confirmation Cancel Confirm