How to automate releasing a Release

Conrad Goodman April 28, 2023

I need to set up an automation rule to release a 'Release' within a project, when the condition is met that all tasks tagged with that version are in the status of 'Released'.

 

I have seen there are various options for releases in Automation, including 'When Version Unreleased'.

 

I've tried Google and ChatGPT, but I'm a complete beginner and cannot make sense of the answers.

2 answers

1 accepted

0 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

Hi @Conrad Goodman and welcome to the community!

At a basic level, you could do something like this:

  • TRIGGER: Issue Transitioned (To Released)
  • ACTION: Lookup Issues
    • fixVersion IN ({{issue.fixVersion}}) AND status != Released
  • CONDITION (Advanced)
    • {{lookupIssues.size}}
      Less Than
      1
  • ACTION: Release Version

However, this would require more complexity if you're tagging issues with multiple versions (e.g. issue gets simultaneously tagged to major release for planning purposes and minor release for CI/CD purposes).

Conrad Goodman May 4, 2023

Thanks for the help, I have set this up but I'm not confidnt in enabling it, as I don't fully understand the steps.

 

TRIGGER is obvious, a sub-task is transitioned to released.

 

ACTION the logic looks like if any fix version of any description exists, and the status within the issue is set to released... Not sure if this looks up all the issues associated with the version of the issue that was transitioned in the trigger step?

 

CONDITION the logic appears to look for zero issues? Is this zero issues, not sure I understand this.

 

Action: Release version.. Can i put something in so it only releases the version that is tagged in the release? I can only see an option for release the next unreleased version, but I want it to release whatever version was tagged in the issue that was transitioned, if it was the last one tagged in the release.

 

We don't tag issues with multiple versions, so hoping this will suffice! Thanks a lot.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

Here's a breakdown of the steps:

  1. Issue Transitioned to Release
    Correct - This is just how it fires
  2. Lookup Issues
    This is looking for any issues that share the same fixVersion and status is not yet Released
  3. Condition
    Makes sure that the Lookup Issues action above returned 0 issues, ensuring that ALL tasks sharing that fixVersion do in fact have a status of Released
  4. Release Version
    Releases the version
Like Trudy Claspill likes this
Conrad Goodman May 10, 2023

Thanks a lot Mark. Step 4 is the only one I'm still unsure on. From JIRA:


By default, this will release the next unreleased version with the existing release date. If none is set, release date will default to today. You can change the order of the next unreleased version in the 'Releases' screen of the project and change the other options in the 'More options' section below.


Will the above automation only release the version that the intial issue was assigned to in fix versions?

It is unclear to me, what happens in the scenario that perhaps we have 2 unreleased versions of differing project names like 230402-Sales and 230402-Operations for example...?

Cheers

 

Conrad

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2023

You could get more specific with which version to release by using this smart value:

{{issue.fixVersions.Name}}

This will specifically release whatever fixVersion has been applied to the issue that triggered the  rule.

Like Conrad Goodman likes this
Conrad Goodman May 10, 2023

That is a perfect solution, cheers Mark!!

Like Mark Segall likes this
Ayush Ghuliani September 22, 2023

@Mark Segall I was trying to solve the same problem described above but not able to use fixVersion IN {{issue.fixVersion}} in JQL 

 

I want to release a version when all the issues inside it have the status "deployed"

 

jira release.png

 

Please suggest where I am going wrong

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2023

Hi @Ayush Ghuliani - It appears I may have had a typo above as I missed parentheses.  It should be this:

fixVersion IN ({{issue.fixVersion}})

I'll also update my original answer for anyone else that comes across this answer. 

Ayush Ghuliani September 22, 2023

Tried this, still the same..Query cannot be validated.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2023

Does it work if you try it plural?

fixVersion IN (({{issue.fixVersions}})
Like Jade Dang likes this
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.
September 22, 2023

Hi @Mark Segall 

I believe if the Fix Version names have any spaces or special characters, that will not work unless they are wrapped in quotation marks.  Perhaps something like this instead:

fixVersion IN ( {{#issue.fixVersions}}"{{name}}"{{^last}}, {{/}}{{/}} )

Kind regards,
Bill

Like Mark Segall likes this
0 votes
Jade Dang
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!
October 12, 2023

Thanks all for this very helpful information! I was able to get it working on my setup thanks to all the replies. Here is my implementation. I tested it and it works! For my setup, when all the issues in the version are set to done, it will release that version (specifically, the fixVersion of the trigger issue is released)

JIRA automation Release the version when all tasks are done.png

Brian Taylor November 29, 2023

Jade Dang - I tried your solution for automation of releasing releases but I am running into a problem that if I put any issue into Done and still have other issues not in a done state it still Releases the Release.

Screenshot 2023-11-29 at 3.12.28 PM.png

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 29, 2023

Hi @Brian Taylor 

That text is covering part of your audit log image, and it seems to show that the lookup issues action returned no issues, and some other possible causes:

Do you have one, or more versions in your trigger issue?  If more than one, you may need a different syntax for that JQL.

Smart values are name, spacing, and case-sensitive.  In your advanced compare condition, the smart value for the lookup is incorrect, which is comparing null to 1.  Please try changing that to:

  • first value: {{lookupIssues.size|0}}
  • condition: equals
  • second value: 0

 

Kind regards,
Bill

Brian Taylor December 1, 2023

@[deleted] - That did the trick.  Thank you for your help.

 

Screenshot 2023-12-01 at 1.58.50 PM.png

Like # people like this
Oscar Nunez May 20, 2024

@Brian Taylor I was trying to replicate that automation but it is not working for me, can you please help me here.

 

what I want to achieve is to "Release" all version that have all issues done.

Screenshot 2024-05-20 181248.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events