Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: Release is approved.

David McCorkindale
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!
November 9, 2023

Hi,

I'm trying to figure out if there is any automation options to release a version when it becomes approved?  The approval condition in the automation only says it works for jira service management?

It would be good to be able to initiate the release upon approval.

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
November 10, 2023 edited

Hi @David McCorkindale 

While there is no automation rule trigger for approving a release, and the Version Updated  trigger does not detect approval changes...there is a work-around: use a scheduled trigger and call a REST API function to check approvals.

For example:

  • trigger: scheduled trigger rule
  • the fuzzy part...decide which versions to check, or check them all
  • action: Send Web Request to call a REST API function to get the information (please links below)
  • advanced compare condition: check if your version is approved by all approvers
  • action: release version

Regarding the fuzzy part, to use a specific version, you could use Lookup Issues with JQL to find the issues in the next, unreleased version...and then use that in a call to the REST API.  This seems a better idea than...Or, you could gather all of the versions and parse / filter them.  That may be a problem later as more versions are added, pagination or filtering is required to get your correct version.

When making the REST API call, add the following to the end of the URL so the approver information is returned:

?expand=approvers

 

If you want to try this approach, here are some references:

How-to article for calling the Jira REST API from a rule -- https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

Get a specific version -- https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-id-get

Get all versions, paginated -- https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-project-projectidorkey-version-get

 

Kind regards,
Bill

0 votes
Valerie Knapp
Community Champion
November 10, 2023

Hi @David McCorkindale , thanks for your question.

You could try, as a workaround, if you use an issue in Jira to record when the Release is approved, on the transition to the status to 'Approved' to release the version, like this

image.png

The default behaviour of the rule is to release the next unreleased version but it should be possible, if you have the FixVersion in the Jira issue, to refer to that with a smart value.

Please evalaute this solution and give us your feedback.

Cheers

Suggest an answer

Log in or Sign up to answer