Obtain user URL from a IBuildResult in the RTC Plain client
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
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.
One other answer
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/ .