Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

unique assignee email in jira automation

Anna
Contributor
April 30, 2024

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? 

1 answer

0 votes
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2024

Hello @Anna 

Are you in data center? If so, unfortunately its not natively possible. Because there is no "Advanced Branching" in data center edition. Please vote here: https://jira.atlassian.com/browse/JIRAAUTOSERVER-749

There is one convoluted way to achieve this but I dont think its needed.

This suggestion by @Bill Sheboy is a good alternative till Advanced branching is implemented. Its simple and follows KISS principles.

Steps:

  • "Create a saved filter to return the issues in the current sprint and which are assigned to currentUser()
project = yourProjectName
AND sprint IN openSprints()
AND assignee = currentUser()
ORDER BY Rank ASC
  • And then try...
    • PUSH information method: With your automation rule triggered on sprint start, use the lookup issues action to identify the issues and the distinct assignees with {{lookupIssues.assignees.emailAddress.distinct}} and send them the email with the link to the saved filter, or...
    • PULL information method: Ask the team members to subscribe to the filter on a cadence matching the sprint starts "

https://community.atlassian.com/t5/Automation-questions/Re-Send-reminder-email-with-issue-list-to-every-assignee/qaq-p/2684018/comment-id/10273#M10273

 

 

Anna
Contributor
May 1, 2024

Hi Kalyan,

Thanks for your reply. we use Jira Data Centre and I know it it is possible on Cloud platform. I will try to follow the steps you suggested from Bill's post.

I voted for the issue to be included in Data Centre!

Like Kalyan Sattaluri likes this

Suggest an answer

Log in or Sign up to answer