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

  1. Let's assume there are two date picker fields available on the issue screen namely start_date  and duedate. 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:
    1. Navigate to Project Settings > Automation and click on the Create Rule button.
    2. Select the Trigger as Field value changed  and put start_date  and duedate  under Fields to monitor for changes  box.
    3. Then under action, select Edit Issue and choose the field Original 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.

    4. 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.
    5. Rule details and execution will look something like below:


Last modified on Jun 4, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.