Hello community!
The problem I'm trying to solve is to figure out is a version in a project is archived.
The closest thing I came up with is
{{project.versions.get(6).archived}}
But I would like to access the property by its name, not by its index.
The only thing I can think of is to iterate throughout the versions and to find my version by myself. But there must be an easier way.
Hi @axone -- Welcome to the Atlassian Community!
Without seeing your complete rule, I believe the answer is "maybe".
If you are trying to find a specifically named issue (i.e. literal value) in the list, you could try filtering the smart value list on the name, and then access the archived attribute: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
If instead you are trying to use a dynamic value for filtering, such as from an issue's field or created variable, filtering does not work. Instead you would need to walk the list in an advanced branch and use conditional logic to test archived.
Kind regards,
Bill
Now that I think about this...another way that might work is to expand your versions into a list with your own delimiters, iterate the list, use a regular expression with match() to find the desired name (which can use smart values as params), and then check the archived attribute. Please note, I have not tried this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.