A4J Rule: Send email if assignee has more than 3 issues in current sprint
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Disclaimer:
This is an example rule. Creating rules to meet specific requirement is outside of Atlassian Support Scope. These example are for reference only and not prescriptive.
Every Environment is different and so is every requirement. Our intention here is to share what we learned along the way. Even if you cannot use the rule exactly described, we hope the concepts should be helpful in designing your own Automation rules.
Automation for Jira is a powerful tool. We expect you to follow your organisational Change Management policies. Please test before implementing on production environment.
Purpose:
If there are more than three issues in IN PROGRESS status for the current assignee in the sprint, an email should be sent automatically to assignee/recipients.
Solution
Issue transitioned Trigger:
Issue transitioned Trigger:
We can trigger the rule with "Issue Trigger" like "Issue transitioned". However, this would mean:
- The trigger issue will be skipped in the action. So we need to make the Issue count condition to n-1 (so if you want the rule to send the mail when there are 3 issues in Progress the condition should be set to 2)
- Since the Status transition is expected to happen pretty frequently in the instance, it's likely that the rule would be triggered quite often without any action. This could potentially raise some performance issues.
- Since we cannot use the dynamic sort of "Run As" for A4J rules yet, if a user transitions an issue to IN PROGRESS status to which this user is not assigned, the automation rule would not take the desired action because it would not pass the IF condition we're adding:
Rule Details:
Trigger | Issue transitioned | This would monitor any issue transition from Any to "In Progress" status |
Branch rule | JQL | Here you can modify the JQL as per your wish. The trick is:
|
Condition | Advanced compare condition | Placeholder{{issues.size}} greater than 2 (here reducing the number - 1) |
Action | Send email |
You can follow this article's Example: Sending an email with a list of issues section |
Expected Result: