Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do you use the Bamboo REST API to add a comment to a build that includes a JIRA key that will be indexed by the Bamboo JIRA plugin?

Jeff Schnitter
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2011

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.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2011

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.

TAGS
AUG Leaders

Atlassian Community Events