Using RPE to publish a configuration-aware hyperlink from RTC to DNG
My users want to publish RTC work items and hyperlinks to related requirements in DNG. When I publish the workitem/auditableLink/targetRef/uri, it looks like a functional hyperlink has been published.
Accepted answer
Hey Bob,
Sorry, got your requirement wrong last time.
Try this.
The current hyperlink URL you might be getting would be OSLC url like https://clmserver:9443/rm/resources/_NGK4cgTKEeiwf_qXZO_Kng. You need to convert it to OSLC_URL?oslc.configuration=C-C-URL like below.
https://clmserver:9443/rm/resources/_NGK4cgTKEeiwf_qXZO_Kng?oslc.configuration=https://gcserver:9443/gc/configuration/3606
How to get C-C URL in java script. See https://rpeactual.com/2014/07/07/accessing-the-docgen-configuration-information-in-javascript/
_sessionInfo.getDatasourceProperty( “DS1”, “Configuration-Context”, ““)
You could log important information using _sessionLogger. See https://rpeactual.com/2016/04/07/best-practices-for-building-rpe-template-part-2/
Thanks,
Kumar
One other answer
Hi Bob,
The link that you would are printing would be a web resource. Since that resource/link doesn't have C-C, it should be failing to open in browser.
The links from RTC could be of many types. Like to requirements or to test case or to workitem itself. It could be differentiated by the following condition.
name == "com.ibm.team.workitem.linktype.implementsRequirement"
name == "com.ibm.team.workitem.linktype.testedByTestCase"
Regarding the hyperlink, if you want requirement details to be printed, you should then need to use DSC element (with text DNG schema) and configure DSC using the following to convert web resource link to REST API.
uri.replace("resources/", "publish/text?resourceURI=");
Thanks,
Kumar
Comments
Kumar, thanks for your prompt response! My goal is not to print the requirement details, but to have a FUNCTIONAL HYPERLINK that the users can click on in MS Word that will take them to the correct artifact in DNG. Can you comment on what I need to do differently to get a functional hyperlink out into MS Word?