How to auto-populate original estimate field based on two date picker fields?
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
How to auto-populate the Original estimate field based on two date picker fields on any Jira issue?
We will make use of Automation for Jira to achieve this use case.
Solution
Let's assume there are two date picker fields available on the issue screen namely
start_dateandduedate. To calculate Original estimatewe need to find the difference between the duedate and start_date field. Every time start_date or duedate is edited, the rule should recalculate the Original estimate on the corresponding issue. To achieve this, here are the steps we need to follow:Navigate to Project Settings > Automation and click on the Create Rule button.
Select the Trigger as
Field value changedand putstart_dateandduedateunderFields to monitor for changesbox.
Then under action, select
Edit Issueand choose the fieldOriginal Estimatefrom the dropdown. Set the expression below{{start_date.diff(duedate).days}}dFeel free to refer to Jira smart values - date and time.
Now, add or edit the start_date or due date fields on any issue, and the Original estimate will be calculated automatically based on the difference between these two fields.

Rule details and execution will look something like below:

Was this helpful?