Automation for Jira - How to trigger an automation rule based on a due date field

Still need help?

The Atlassian Community is here for you.

Ask the community

robotsnoindex

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

    

Summary

This article explains how to create an automation rule that will be triggered based on a due date field.

Example of use case 1:

  • Jira tickets are configured with a due date field
  • We want unresolved tickets to be automatically transitioned to a status (For example the status "Past Due Date") when the due date is today

Example of use case 2:

  • Jira tickets are configured with a due date field
  • We want to inform the assignee of a ticket when the due date of an unresolved ticket is in 30 days

Environment

  • Jira Server / Data Center 8.0.0 and any higher version
  • Automation for Jira 7.0.0 and any higher version

Solution

As there is currently no built-in trigger in Automation for Jira that fires a rule when a due date has passed, we must set up a rule using the Scheduled trigger instead, and configure it to run once per day.

Use case 1:

The automation rule will look like this:

  • WHEN:
    • Scheduled, once a day, using the following JQL query that will search for issues that are unresolved and for which the due date field is today:

      duedate = startOfDay() AND resolution is empty
  • THEN:
    • Add the action of your choice (for example, an action transitioning the Jira issue to a new status called "Past Due Date")

The screenshot below shows an example of automation rule that illustrates this configuration:


Use case 2:

The automation rule will look like this:

  • WHEN:
    • Scheduled, once a day, using the following JQL query that will search for issues that are unresolved and for which the due date field is today:

      duedate = startOfDay("+30d") AND resolution is empty
  • THEN:
    • Add the action of your choice (for example, a send email action to inform the assignee that the ticket is due in 30 days)

The screenshot below shows an example of automation rule that illustrates this configuration:



Last modified on May 30, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.