Get Links (related) in Javascript in Eclipse for RTC web
I need to be able to get the links associated with a workitem using the attribute customization javascript in eclipse to be used in RTC web client. I was looking online, and it looks like i can use getProxy(); like this:
var childLinks = workItem.getProxy().getValue({
path : [ 'linkTypes', 'com.ibm.team.workitem.linktype.parentworkitem' ] });
which would get all parent links which would be great. but if i add this and just have return "test"; and attach to string attribute, i don't even see "test" ... it fails on this. I even tried just
but still not working ... am i missing a dojo.require? or is this not possible in eclipse for web client?
|
Accepted answer
Ralph Schoon (63.4k●3●36●46)
| answered Apr 21 '21, 3:35 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Apr 21 '21, 3:39 p.m.
My JavaScript skills are almost non existent. I am also not sure what libraries you can get to in the Attribute Customization. See https://jazz.net/wiki/bin/view/Main/AttributeCustomization for the documentation and my knowledge base. Keep in mind that in the EWM/RTC Eclipse client you do not have all the libraries you see in the web UI.
I do not know what you can do with the proxy. There are several posts here that explain what it does and how.
Access to work item link data is available in the Client/common/server Java API. See https://rsjazz.wordpress.com/?s=link+api&submit=Search
It is also possible to use the OSLC and other APIs to get themWith the correct access to the right Libraries JavaScript can use these APIs. I just can not tell you if you can use those in the RTC Eclipse client where the attribute customization is run when editing work items. Michelle Rutkunas selected this answer as the correct answer
|
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.
Comments
Just so you know the code you are using is internal API. It also only works in the Web UI.
This is an undocumented JavaScript method that only works in the Web UI in attribute customization. It can change at any time and stop working. That is what I mean with internal unsupported API. If something goes wrong support might not be able to help.