Hi there,
I am trying to group records by distinct assignee and collect all defects per assignee in one email. These are my steps in automation rule (Scheduled)
1. I started with lookup issues and placed my query: issuetype = bug and priority= Medium and 'Groomed Date' >=startOfDay(-5d) and 'Groomed Date' <startOfDay(-2d). Output returns 5 issues
2. then created variable distinctAssignee with value: {{lookupIssues.assignee.distinct}}
3. Added lookup issues after it to run group with disstinctAssignee: issuetype = bug and priority= Medium and 'Groomed Date' >=startOfDay(-5d) and 'Groomed Date' <startOfDay(-2d) and assignee = "{{distinctAssignee}}"
4. In the email body I added text:
{{#lookupIssues}}
<a>{{key}}</a>
{{/}}
I tried {{distinctAssignee}} in TO field in my email, and the logic places all distinct assignees in TO field and send 5 emails with 1 issue in it. There was no group by assignee done.
How should I organize this logic to get 1 email per assignee all related records to the assignee?