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

Rest-Api: Release version in Jira and move all unresolved issues

Bob Jones September 10, 2012

Hi all,

as part of our continous integration workflow (CCNet, nant) we are aiming at automatically releasing a version in Jira if that version is succesfully build. However, the released version may still have unresolved issues. Using the Jira-GUI to release a version will automatically prompt the user to move all unresolved isses to a new version and we are wondering if that is also possible using the rest-api. Releasing a version is easily done via rest, but:

Does the rest-api offer a way to move all unresolved issues of one version to another?

If not, is there a way to at least retrieve all unresolved issues of a version? AFAIK there is only a function to retrieve the unresolved issue count.

Thanks in advance for any hints!

Bob

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Bob Jones October 9, 2012

Jobin, thanks for hint.

However I did some poking and it seems there is an undocumented option to the REST modify version call named moveUnfixedIssuesTo which does the job. Here's an example using Curl:

curl -u username:password -H "Content-Type: application/json" -X PUT -d @json.txt http://jira/rest/api/latest/version/11111

with json.txt containing the string:
{"id":"11111","userReleaseDate":"11/Oct/12","released":true,"expand":"operations","moveUnfixedIssuesTo":"22222"}

11111 is the {id} of the version to be released
22222 is the {id} of the version the unresolved issues are moved to

Works like a charm so far...

Jobin Kuruvilla [Adaptavist]
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.
October 9, 2012

Awesome... :)

Tyrone Grech August 26, 2016

Precisely what I was looking for, thanks

1 vote
Jobin Kuruvilla [Adaptavist]
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.
September 10, 2012

There is no direct method using REST but you should be able to do it in a few mthods.

1. Get all unresolved issues in a version using search method by passing a JQL

2. Iterate on those and update the version to the new version using issue update.

3. Release the version.

aayush elecety August 14, 2015

Do U know how to Release a version? I mean the the whole Command

0 votes
aayush elecety August 14, 2015

Hi I trying to release a version via Rest but i am not able to do it can u help me with this

TAGS
AUG Leaders

Atlassian Community Events