REST API call from Bamboo to JIRA.

We are using the Issues tab to link issues from JIRA to our builds in bamboo. I am experiencing trouble with the results that are being returned. I have included the DEBUG information from the log.

Request:

011-08-17 15:28:11,331 DEBUG [qtp741284129-20] [header] >> "GET /jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project%3D%22AGN%22+AND+issuekey+IN%28AGN-6760%2CAGN-6759%29&tempMax=100&field=summary&field=type&field=status&field=link HTTP/1.1[\r][\n]"

Response(Partial):

m 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "HTTP/1.1 200 OK[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Server: Apache-Coyote/1.1[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Set-Cookie: JSESSIONID=A7D60DD9D1154F1744AE1A8C71A5AEDD; Path=/jira[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "X-Seraph-Trusted-App-Status: OK[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Cache-Control: no-cache, no-store, must-revalidate[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Pragma: no-cache[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Expires: Wed, 31 Dec 1969 23:59:59 GMT[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Content-Type: text/xml;charset=UTF-8[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Date: Wed, 17 Aug 2011 19:28:12 GMT[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,735 DEBUG [qtp741284129-20] [header] << "Connection: close[\r][\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "<"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "!"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "-"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "-"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " RSS generated by JIRA (Enterprise Edition, Version: 3.13.2-#335) at Wed Aug 17 14:28:12 CDT 2011 -->[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "<!-- If you wish to do custom client-side styling of RSS, uncomment this:[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "<?xml-stylesheet href="http://xxxxx/jira/styles/jiraxml2html.xsl" type="text/xsl"?>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "-->[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "<rss version="0.92" >[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "<channel>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <title> &amp; </title>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <link>http://xxxxx/jira/secure/IssueNavigator.jspa?reset=true&amp;sorter/field=issuekey&amp;sorter/order=DESC</link>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <description>An XML representation of a search request</description>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <language>en-us</language> <issue start="0" end="100" total="259785" /> <build-info>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <version>3.13.2</version>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <build-number>335</build-number>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <build-date>26-11-2008</build-date>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " <edition>Enterprise</edition>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << " </build-info>[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "[\n]"

jvm 1 | 2011-08-17 15:28:12,767 DEBUG [qtp741284129-20] [content] << "<item>[\n]"

The results are being returned but Bamboo cannot display the Issue description because the result is not in the list of 100 returned. Also I would only expect 2 issues to be returned based on the search criteria being sent to JIRA.


2 answers

0 votes

A note - this question was filtered by our new spam protection. I'm trying to figure out why.

Hey,

My undestanding of the problem is that, JIRA is returning more than 100 results when the follwoing JQL query is applied:

/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project%3D%22AGN%22+AND+issuekey+IN%28AGN-6760%2CAGN-6759%29&tempMax=100&field=summary&field=type&field=status&field=link

Can you please let me know what result the JQL above returns in JIRA, when viewed via the UI. You can use the following URL:

https://HOST_NAME/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project%3D%22AGN%22+AND+issuekey+IN%28AGN-6760%2CAGN-6759%29&tempMax=100&field=summary&field=type&field=status&field=lin

Cheers,

Ajay.

I did try this and the results I get back are 0 records.

issue start="0" end="0" total="0"

Looking at the criteria it looks like it is putting the KEY for both the project and the issueKey in the url. Here is my links on the plan:

Name: Aligne Production Key: AGN

Hope this helps I have been strugglingwith this for a while. I had setup a test JIRA to confirm the versions were compatible and everything worked cause I had only 2 issues then when I tried to hook to production I cannot get it to work cause of the results being returned. I did setup another link to confirm it was working and they linked properly cause they are in the results of the first 100 returned.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,068 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot