Automation for Jira - How to trigger an automation rule based on a due date field
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 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
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:
1
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 an 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:
1
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 an automation rule that illustrates this configuration:
Was this helpful?