Automatically release a version
Asked by Aftab_Akhtar:

Hi,

I am looking to create a rule that would do two things.

**1. Automatically release a version at the end of the month.**

**Issue:** I have a release date against this version and it has not released it.

![Screenshot 2023-12-28 170753.png](https://community.atlassian.com/t5/image/serverpage/image-id/298354iE8CAE6E0B30555EA/image-size/large?v=v2&px=999 "Screenshot 2023-12-28 170753.png")

i have set this rule up. however it does not seem to be working.

![Screenshot 2023-12-28 171121.png](https://community.atlassian.com/t5/image/serverpage/image-id/298355i27105952249E74D2/image-size/large?v=v2&px=999 "Screenshot 2023-12-28 171121.png")

2. Automate a creation of a new release once point 1 has been actioned.

my version numbering is 24.1--\> 24.2 ---24.3 and I want it to go to 30.1 if possible.


Answers:
author: Bill Sheboy
body: Hi [@Aftab_Akhtar](/t5/user/viewprofilepage/user-id/2836308)

Your rule's trigger is for "Version Unreleased", but you describe releasing on a schedule. Perhaps try the Scheduled trigger instead: <https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Scheduled>

For your second part of creating a new version, based on the name of version just released, the rule would need to:

* somehow capture the version about to be released (using either Lookup Issues with JQL or a call to the REST API with the Send Web Request action)
* extract and increment the version number (There are several questions in the community about how to do this. Essentially using text and math expressions.)
* Create the new version with the new name

Kind regards,  
Bill

comments: author: Aftab_Akhtar
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

I hope you are well. I hope you can help me with this.

There are two things I am trying to achieve.

1. I want to close a release with a rule. I have set up the below rule and it has not seemed to work.

![release version 1.png](https://community.atlassian.com/t5/image/serverpage/image-id/314253iE695550F21833C00/image-size/large?v=v2&px=999 "release version 1.png")

The below screenshot are the release versions the rule is working against. I was expecting 23.12 to be released.

![release version 2.png](https://community.atlassian.com/t5/image/serverpage/image-id/314254iFBBF2E1CCF6C7446/image-size/large?v=v2&px=999 "release version 2.png")

2. I want to then create a new version based on the last released version

![point 2.png](https://community.atlassian.com/t5/image/serverpage/image-id/314258iD86257968B8A4FB3/image-size/large?v=v2&px=999 "point 2.png")

version name: {{version.name.substringBeforelast(".")}}. {{#=}} {{version.name.substringAfterLast(".")}}+1{{/}}

Where am I going wrong and what would I need to change? any help is appreciated.

thanks

Af


author: Bill Sheboy
body: Hi [@Aftab_Akhtar](/t5/user/viewprofilepage/user-id/2836308)

With your first rule, it seems you want to release the next version. And so the scheduled trigger should have no JQL as the Release Version action will release the next version, by default. There are additional things under "More Options" if you want to adjust that behavior.

With your second rule, you want the action of the first rule (i.e., releasing the version) to trigger the second one.

By default, the actions of one rule cannot trigger another rule. This is to prevent errors and run-away looping. For your scenario, you want this triggering to happen, and so in the details at the top of the second rule, enable the "Allow Rule Trigger" option: <https://support.atlassian.com/cloud-automation/docs/create-and-edit-jira-automation-rules/#Edit-the-details-of-a-rule>

Kind regards,  
Bill


Tags: cloud

jira-software-cloud