How to auto-populate original estimate field based on two date picker fields?
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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_date
andduedate. To calculate Original estimate
we need to find the difference between the duedate and start_date field. Every time start_date or duedate are 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 changed
and putstart_date
andduedate
underFields to monitor for changes
box. Then under action, select
Edit Issue
and choose the fieldOriginal Estimate
from the dropdown. Set the expression as below{{start_date.diff(duedate).days}}d
Feel free to refer to Jira smart values - date and time.
- Now, add or edit the start_date or duedate fields on any issue and that will calculate the Original estimate automatically based on the difference between these two fields.
- Rule details and execution will look something like below: