Restrict due dates in Jira Cloud to 2 business days before the deadline

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

Summary

Learn how to restrict editing of the due date field within two business days using Automation in Jira Cloud.

Solution

Create and configure the Automation rule

Go to the Cog icon > System > Global automation > Create rule.

  1. Add the field value changed as the trigger.

  2. Add an action and use the create variable.

  3. Add the variable name and the following Smart value. This will save the original date as a variable with the date format as defined in the Smart value.

    {{fieldChange.from.toDate.format("yyyy-MM-dd")}}
  4. Add a condition and select IF or ELSE: Add condition options.

  5. Click on the Add condition and select {{smart values}} condition.

  6. Add the {{originalDate}} variable to the smart values condition with the condition equals, and leave the second value to be empty.

  7. Click on Add else and select Add condition > {{smart values}} condition, and add the following smart value. This will compare today’s date and the due date field that has been changed.

    {{now.diff(fieldChange.from.toDate).days}}
  8. Select “less than” as the condition and use 2 in the second value.

  9. Click Next and add a new action, select Edit work item.

  10. Select Choose fields to set and select Due date.

  11. Add {{originalDate}} smart value in the due date field.

  12. Once this is done, click on the “Turn on rule” button and give the rule a name.

Updated on June 11, 2025

Still need help?

The Atlassian Community is here for you.