I have a scheduled automation which
1. Defines lookupIssues with a JQL
2. Has a "for each smart value" branch for the components by MyComponent = {{lookupIssues.components.name.distinct}}
3. I would like to send out for each distinct component an e-mail that contains the keys and fix versions; however, the email body doesn't contain anything, where I have the following code
email body:
{{#lookupIssues}}
{{#if(equals(issue.components, {{Mycomponent}} )) }}
* {{key}} : {{fixVersions.name}}
{{/}}
{{/}}
Rem.:
I did print out the {{MyComponent}} and it is valid, there are distinct values
There are items, and fix versions, I printed them out too.
Any ideas where I am making the mistake?
Thanks!
Hi @Agnes Bodor -- Welcome to the Atlassian Community!
You are encountering a limitation of the long-format of list iterators: Once inside the iterator, no outside data is visible. Only data from the iterator, and lower can be accessed.
Thus, your MyComponent variable cannot be used to filter the list.
The workaround for this is to use the Lookup Work Items action twice, as shown in this related knowledgebase article. I also added the flatten function to correct a problem in your advanced branch's smart value.
The flatten is needed because the Components field is a list, and thus with the lookup it produces a list-of-lists...where the distinct function will work on sets of components, rather than on individual ones.
Kind regards,
Bill
Thank you Bill!
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.