Automation for naming and creating a new version

Frida Gustafsson December 5, 2024

We are naming our versions like this:

  • 24R1 6.1
  • 24R1 6.2
  • 24R1 6.3
  • ...

 

I'd like to create an automation rule which helps me create a new version with the correct name when the previous version is released.

I've found the smart value for version names, {{version.name}}, but since we're changing the last digit with every release it requires some modification. 

 

We're in a Team-managed project in Jira Cloud.

Screenshot 2024-12-05 113955.png

2 answers

2 accepted

2 votes
Answer accepted
Marc - Devoteam
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.
December 5, 2024

Hi @Frida Gustafsson 

  • trigger: version released and matches your version filter.

    For example: Version name filter: 24R1 6.

  • action: add to audit log the version released is {{version.name}}

  • action: create variable
    name: varprefix
    value: {{version.name.substringBefore(".")}}.

  • action: create variable
    name: newminor
    value: {{version.name.substringAfter(".").asNumber.plus(1).format("0")}}

  • action: create version
    {{varprefix}}{{newminor}}

 

This should do the trick, all this becaause version are not text.

Frida Gustafsson December 5, 2024

Thank you! I have updated according to your notes.

Do you have a good idea on what to fill in the start date field? The start date should be the day after the release date of the previous version. Screenshot 2024-12-05 131221.png

Frida Gustafsson December 5, 2024

(ignore the version name on my screenshot, it was shot before your comment)

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.
December 5, 2024

Hi @Frida Gustafsson 

Adding to the suggestions from @Marc - Devoteam ...

The numbering format for your versions will determine the logic needed to increment versions. 

For example, if your minor versions increment up until some maximum (e.g., 12) then additional logic is needed.  Please see this other post for an example of how to handle that situation: https://community.atlassian.com/t5/Jira-questions/How-can-I-automate-creating-a-new-version-after-a-version-is/qaq-p/2235664#M660611

 

Regarding the "Start date" question, you may use the date / time functions to access and increment the date from the just-released version in the trigger: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

 

Kind regards,
Bill

Like # people like this
0 votes
Answer accepted
Utkarsh Agarwal
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.
December 5, 2024

Hi 

Can you try to use the following smart value in the Version Name field for the "Create version" action:

 

{{version.name.substringBeforeLast(".")}}.{{version.name.substringAfterLast(".").asNumber.plus(1)}} 
Frida Gustafsson December 5, 2024

Thank you! Will test.

Do you have a good ide on what to fill in the start date field? The start date should be the day after the release date of the previous. Screenshot 2024-12-05 131221.png

Suggest an answer

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

Atlassian Community Events