I am trying to add a comment to a Bamboo build that includes a set of JIRA keys. I want to leverage the JIRA Bamboo plugin so that I can see the Bamboo build on the Builds tab of the JIRA. Why am I doing this? We have multiple builds from multiple SVN repositories that get bundled into an uber build. I want a way to show which JIRA issues were included in the uber build. I get the list of JIRA keys from the SVN log for each of the repositories.
I am able to use curl to post a comment to the build that has JIRA keys. However, the JIRA keys are not displayed as hyperlinks, only as text, so Bamboo has apparently not recognized them as being keys and does not add them to the Related Issues section of the Bamboo build and the Bamboo build is not shown on the Builds tab of the related JIRAs.
If I cut and paste the same comment in the Bamboo UI, I get the expected behavior -- the JIRA keys become hyperlinks, they are shown on the Related Issues section of the build result and are available on the Builds tab in JIRA.
As an interesting side note, the JIRA keys in my original post also get converted to hyperlinks by adding this second comment.
Here is my curl command:
curl -v -H 'Content-Type: application/xml' -X POST -d @curl.input --user myUser:myPassword https://bamboo:8085/rest/api/latest/result/TEST-TEST-100/comment?os_authType=basic
Here is my curl.input file:
<comment author="myUser">
<content>This build includes the following JIRAs: TEST-100, TEST-101, TEST-102. </content>
</comment>
Any suggestions on how I can use the REST API to add JIRA keys in my comment and have them indexed by the JIRA Bamboo plugin would be greatly appreciated. Thanks.
Community moderators have prevented the ability to post new answers.
From what I see in the Bamboo code you had encountered a bug. The REST api point doesn't parse the added comment and doesn't update the jira issue links...
I've raised a ticket https://jira.atlassian.com/browse/BAM-9458 for that problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.