It's all about the answers!

Ask a question

Obtain user URL from a IBuildResult in the RTC Plain client


Michael Baylis (1832719) | asked Oct 05 '17, 5:51 a.m.
edited Oct 06 '17, 2:19 a.m. by Ralph Schoon (62.3k33643)

 Hi,

     I am using the RTC Plain Client to request and monitor a build.   I end up with a IBuildResult.   If the build fails, I would like to email the admins.   How can I get a URL to the web UI for the build result.  I am using 6.0.3 at the moment.

In fact how can we convert work items to web ui urls?

Cheers,

Michael

Accepted answer


permanent link
SEC Servizi (97123156) | answered Oct 06 '17, 9:27 a.m.
edited Oct 06 '17, 9:31 a.m.
 If the build fails, I would like to email the admins.   How can I get a URL to the web UI for the build result.
Since you are trying to send an e-mail, you have to create a string for the URL and it's quite simple if you know the project area name and the build result UUID:
${repositoryURI}/web/projects/${ProjectAreaName}#action=com.ibm.team.build.viewResult&id=${UUID}
See com.ibm.team.build.web plug-in, BuildUtil.js file, getResultHref function...
Cheers.
Michael Baylis selected this answer as the correct answer

One other answer



permanent link
Ralph Schoon (62.3k33643) | answered Oct 06 '17, 2:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The contributor that requested the build is in the IBuildRequest. See com.ibm.team.build.common.model.IBuildResult.getBuildRequests() and then 
com.ibm.team.build.common.model.IBuildRequest.getInitiatingContributor()

Item URI's have to be constructed. Usually the Item UUID is involved. I am not sure I have tried it for build results. If at all most likely in the work item command line. You can try to dig into my blog https://rsjazz.wordpress.com/ .  

Your answer


Register or to post your answer.