Hello Atlassian Community,
I'm currently working on a Jira Automation rule where I need to iterate over the labels of an issue and perform actions based on the presence of a specific label.
I've tried to locate the field Labels and use an if-statement, to see if the 'Labels'-field contained a specfic label, but when it does, I tried to then write {{Story Points}}, but it seems like once I am inside the Labels-field, extracting Story Points from the issue is not possible.
Has anyone successfully implemented a similar automation rule, or can you provide guidance on how to achieve this? Any insights or alternative approaches would be greatly appreciated.
Thank you!
Hi @Mafrik Pranks -- Welcome to the Atlassian Community!
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
What is the problem you are trying to solve with this rule? That is, "why do this"? Knowing that may also provide context.
I suspect your rule is using a list iterator over the labels field to find the value, and then trying to access the Story Points field. That is not possible with automation rule iterators.
Once inside an iterator, the only scope which is visible is at that level (e.g., Labels) and lower. The Story Points field is at the same level as Labels, and so is not visible.
Depending on your rule structure and scenario, there may be work-arounds possible. For example, using the Create Variable action to expand a list with the match() function, or using the replaceAll() function with a regular expression. Seeing your rule will help to know how to proceed.
Kind regards,
Bill
Hello Bill,
It is as you wrote, I want to sum up all story points in a sprint for each of the different Labels there is.
So I've tried the following:
{{issues}}
{{#labels.match(".*(LabelOne).*")}}
LabelOne: {{Story Points}}
{{/}}
{{/}}
This correctly prints LabelOne: for every story which contains 'LabelOne', however, the Story Points does not show. That now makes sense, if it's not possible to check, because Labels and Story Points are on the same level.
Is there some way, one could go one step back so to say, so that I could reach the story point section and then print the value?
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you trying to sum the story points for the issues with a specific label, or list the individual story point values for issues which have the specific label?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mafrik Pranks
Welcome to the Atlassian community.
Please show us screen image(s) of the entire rule that you have created so far, and the details of each step.
I also note that you have tagged your post as jira-server. Are you using Jira Server or Jira Data Center, and what version of it are you using? The functionality available in the Automation feature is different depending on your answer.
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.