I'm trying to add an automation that will:
That automation currently looks like this:
This breaks if an issue is returned by my query that has more than one component value (component is required for this project so it's guaranteed we will have at least one value).
How do I get the distinct set of individual component values across the entire set of issues, instead of the distinct combinations of component values across the entire set of issues?
Did you try
{{lookupIssues.components.name.flatten.unique}}
while flatten breaks down arrays, unique will remove duplicates.
Also did you try removing the == and use only one =
"<my query> AND component = {{distinctComponent}}"
I hope it helps
btw, I've managed to run a similar scenario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Confirming that `flatten` works, thanks! Although this is not documented under Smart value list documentation - so I'm not sure how I could have found out it existed without asking here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/
Working syntax is `{{lookupIssues.components.name.flatten.distinct}}`
The `==` in my question was just a syntactical error that was not present in my query!
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.