How get web URL from RTC work item in RTC server follow-up action plugin?
Hello!
I have implemented such code to get work item references in an RTC server side plug-in (follow-up action): IWorkItemReferences refs = saveParameter.getNewReferences(); List<IEndPointDescriptor> listRefTypes = refs.getTypes(); for (IEndPointDescriptor refType : listRefTypes) { List<IReference> listReferences = refs.getReferences(refType); for (IReference ref : listReferences) { URI link_uri = ref.createURI(); URL link_url = link_uri.toURL(); ... } Of course, here I have an IllegalArgumentException because of link_uri which is really looking like to "itemOid/com.ibm.team.workitem.WorkItem/_1bF4ILBAEeO-gIIGxPDnjA". But nevertheless, I can see the normal URL for the link in RTC GUI (both in RTC Eclipse and Web UI): https://localhost:7443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/4 I even can not simply add "http://", server name and port because URI is different from URL conventions! Can somebody help how can it be got a standard URL link in Web format including current server, port, linked object and so on? Thank you! |
Accepted answer
see https://jazz.net/forum/questions/13336/work-item-url#147114
remember the AbstractService provides methods to get repository info
Dmitry A. Lesin selected this answer as the correct answer
Comments
Dmitry A. Lesin
commented Apr 14 '14, 4:55 a.m.
I found that the CLM links are all conforming to HTTP standarts. But if I need to get appropriate RTC internal links then I have to transform them in accordance to mentioned way!
|
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.