Send email if assignee has more than 3 issues in current sprint

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Summary

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:

  • 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: JIRAAUTOSERVER-203 - Allow Rule Actor to be dynamically set JIRAAUTOSERVER-254 - Allow user who triggered event to be rule Actor

Rule Details:

Automation rule details
TriggerIssue transitionedThis would monitor any issue transition from Any to "In Progress" status
Branch ruleJQL

Here you can modify the JQL as per your wish. The trick is:

sprint in ({{TriggerIssue.sprint.id}})

assignee ={{initiator.name}}

Check the Process all issues produced by this trigger in bulk under More options

ConditionAdvanced compare conditionPlaceholder {{issues.size}} greater than 2 (here reducing the number - 1)
ActionSend emailHi {{Initiator.name}}, You have the following issues assigned to you in "In Progress" Status: {{TriggerIssue.key}}, {{issues.key}}. Thanks, Your friendly A4J botYou can follow this article's Example: Sending an email with a list of issues section

Updated on June 5, 2024

Still need help?

The Atlassian Community is here for you.