Query JIRA to get FIX versions for the given JIRA issues

Hi,
I have a JIRA.txt file like this.
Issue:
INF-124 
INF-742 
INF-998 
INF-362
  How can I get the "Fix Version/s" of those Issues only? I am supposed to create a Bamboo plan which when runs, takes this JIRA.txt as input and gives output as below.
Issue Fix Version
INF-124 PRJ 7.1 
INF-742 APP 5.2 
INF-998 PRJ 7.1 
INF-362 APP 5.2
I havent worked on REST APIs. Could you help me how to do this please? 

2 answers

1 accepted

Accepted Answer
0 votes

Hi Theresa!

You can use the GET method of REST on the URL below. Just use any text manipulation function to insert the issue key you need instead of <issue-key>.

http://&lt;jira-base-url&gt;/rest/api/2/issue/&lt;issue-key&gt;?fields=fixVersions

Then it will return a JSON-formatted output similar to the one below:

{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"11604","self":"http://localhost:8646/jira646/rest/api/2/issue/11604","key":"AP-13","fields":{"fixVersions":[{"self":"http://localhost:8646/jira646/rest/api/2/version/10101","id":"10101","name":"1.3","archived":false,"released":false}]}}

The name of the version will be returned by the "name" property (in the example, the version is 1.3) and the issue key will be returned by the "key" property (in the example, it's AP-13).

--
Cheers!

Joao

Sweet. That works great. Thank you so much. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

25,283 views 2 7
Join discussion

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