Automation For Jira - How to create a rule that sends the list of issues that have been in progress for 5 days

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

This article describes how to create an Automation Rule using the Lookup Issues action (available in Automation for Jira from the version 9.0.1), which will send a daily email to a group of users, including the list of issues that have been in the status "In Progress" for 5 days.

Solution

Rule configuration details

The rule will need to be configured as follows:

  • Add the Scheduled trigger with the settings below:

    • Frequency: Once per day

    • Select the option simply run the conditions and actions without providing issues

  • Add the Lookup issues action with the JQL below. Feel free to adjust it to your liking, for example by filtering with a different project or status, or by changing the number of days.

project = SCRUM AND status = "In Progress" AND status changed to "In Progress" before -5d AND NOT status changed to "In Progress" after -5d
  • Add the Send email action with the settings below:

    • In More Option, untick the option Convert line breaks to HTML line breaks

Send as HTML
  • To: Choose the Jira group or recipient of your choice

  • Subject: You can use the suggestion below:

List of issues that have been in progress for 5 days
  • Content: You can use the suggestion below, which will list all the issues along with their URL, summary, and assignee:

    1 <h2>List of issues that have been in progress for 5 days</h2>The {{lookupIssues.size}} issues listed below have been in progress for 5 days:<table border="0" cellspacing="0" cellpadding="2"><thead><tr><th align= "left">Key</th><th align= "left">Summary</th><th align= "left">Assignee</th></tr></thead><tbody>{{#lookupIssues}}<tr><td><a href="{{url}}">{{key}}</a></td><td><a href="{{url}}">{{summary}}</a></td><td><em>{{assignee.displayName}}</em></td></tr>{{/}}</tbody></table>

Screenshot of the rule

The complete rule is illustrated in the screenshot below:

Send email via automation with HTML content

Example of email sent by this rule

List of rules in progress from last 5 days

Updated on May 31, 2024

Still need help?

The Atlassian Community is here for you.