How to get custom Llink by using the server api?
I have created two links and deployed in server and Eclipse Client and those are appearing in the UI. Now I need to get the custom links which I created by using server api. Can anyone suggest.
Thanks
|
Accepted answer
This code snippet used to work for me, but, to be honest, I don't remember whether it returns custom link types as well; if it doesn't, just add manually you custom link types to the Collection:
// retrieve the collection of link types in the RTC environment
Collection linkTypesCollection = ILinkTypeRegistry.INSTANCE.allEntries();
Iterator linkTypesCollectionIterator = linkTypesCollection.iterator();
while (linkTypesCollectionIterator.hasNext()) {
ILinkType currentLinkType = (ILinkType) linkTypesCollectionIterator.next();
String linkTypeID = currentLinkType.getLinkTypeId();
}
Then, you have to check whether each link type is used on the parent work item.
Pavan M selected this answer as the correct answer
Comments Nice, was not aware of the allEntries.
Pavan M
commented Mar 13 '20, 6:58 a.m.
Thank you @ Luca Martinucci
|
One other answer
Ralph Schoon (63.1k●3●36●46)
| answered Mar 10 '20, 2:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER These links should be accessible in the same way other links are. An example: https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ Comments
Pavan M
commented Mar 13 '20, 2:53 a.m.
Thanks for your response
Here by after getting child work item reference we can get the Links. But what I required is I need to get the List of links Types present in the parent work item by using server api? Can you send some code for this.
Ralph Schoon
commented Mar 13 '20, 3:27 a.m.
| edited Mar 13 '20, 3:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
For all I know you have to provide the link type id. since you have defined that yourself, you know it and you can work with it. I do not believe that your custom link type is accessible using the built in definitions. You have to know it on your own. See https://rsjazz.wordpress.com/2014/12/03/creating-custom-link-types-for-rational-team-concert/ where it is defined in the plugin.
I do not have the time and resources to write code for you.
|
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.