Automate start date calculation in Jira with due date and original estimate
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
You use both the Original Estimate and Due Date fields on Jira work items, and want to automatically set the Start Date field based on the difference between their values. We'll create an automation rule in Jira that calculates the Start Date by subtracting the Original Estimate from the Due Date and triggers when the 'Original Estimate' field is changed.
Solution
Create a Start Date calculation Rule
Navigate to Project settings > Automation > Create Rule
Choose the Field Value Changed trigger
Configure it to trigger when the Time Tracking field changes
Add a Smart values condition:
First value:
fieldChange.field
Contains
Second value: estimate
Add a Create Variable action
Variable name:
originalEstimateInDays
Variable value:
{{issue.timetracking.originalEstimateSeconds.divide(28800)
}}This converts the original estimate from seconds to days (assuming an 8-hour workday)
Add an Edit work item action
Set the Start Date field to the smart value:
{{issue.duedate.minusBusinessDays(originalEstimateInDays.asNumber)}}
This formula subtracts the original estimate (in days) from the due date to calculate the start date and uses the minusBusinessDays() function to include weekdays but not weekends
Was this helpful?