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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,308
Community Members
 
Community Events
184
Community Groups

[Automation & Smart-value] Use smart value in function in lists selector

Based on our version names (We have different version on the same Jira project called "API V1 - 1.22.125" and "API V2 - 2.22.236" and also "API V2 - 2.23.3"), i'm trying to create a new version when the latest major version has been published.

Example : Regarding the 3 versions above, when i'm publishing 2.23.3, I would try to create a 2.23.4 only if there is not already a version above manually created (2.23.12 for example).

 

Step by step automation : 

  1. Get all major versions : 
    {{#version.project.versions}}{{#released}}{{#name.startsWith("API V2 - 2.")}}{{name.substringBeforeLast(".").substringAfterLast("."))}},{{/}}{{/}}{{/}}
  2. Get the biggest major version (to be able to compare with current version published) : varBiggestMajorVersion =  {{varAllMajorVersion.split(",").max|0}}
  3. Filter all versions (which has the biggest major version) to get only minor versions : 
    {{#version.project.versions}}{{#released}}{{#name.startsWith(name.left(0).concat("API V2 - 2.").concat(varBiggestMajorVersion))}}{{name.substringBeforeLast(".").substringAfterLast("."))}},{{/}}{{/}}{{/}}

The bold part above is not working. I also tried to put it in a var and then use it : 

  1. varPrefixWithMajorVersion = name.left(0).concat("API V2 - 2.").concat(varBiggestMajorVersion)
    NB : it returns "API V2 - 2.23" as expected
  2. varAllVersionsWithMajorVersion :
    {{#version.project.versions}}{{#released}}{{#name.startsWith(varPrefixWithMajorVersion)}}{{name.substringBeforeLast(".").substringAfterLast("."))}},{{/}}{{/}}{{/}}

It still doesn't work.

My question is : Is it possible to use smartValue in function inside listSelector : 
{{#name.startsWith(smartValue)}}

Thanks


 

0 answers

Suggest an answer

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

Atlassian Community Events