Automate Due date of an issue from Original Estimate

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community


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

Summary

Customers want to be able to automate the 'Due Date' field so that when developers work on the issue and transition it to "In Progress", and the due date is empty, then set the 'Due date' to when it's transitioned, so set Due date to now + 'Original estimate'. Or in some scenarios, customers want to calculate the 'Due date' field based on 'Start date' + 'Original estimate'. 

This article shows how to automatically set the 'Due date' from 'Original estimate' using Automation for Jira

Environment

Automation for Jira

Cause

The Date and time math functions available in Automation for Jira does not support nested smart values. Here are the relevant feature request to provide that option: AUT-1473 and AUT-1063

Solution

Here are the steps to achieve this:

  1. Decide and choose a trigger that should set the 'Due date' field for an issue. Let's say for this article we want to update the 'Due date' as 'Start date' + 'Original estimate' when an issue is created
  2. Choose the action Create variable to store the time tracking estimate in business days using the below query:

    {{#=}}{{issue.timetracking.originalEstimateSeconds}} / (60 * 60 * 8){{/}}

  3. Proceed with Edit action to update the 'Due date' with the 'Orginal estimate' to days value added to the 'Start date':

    {{issue.Start date.plusBusinessDays(TimeTrackingDays.asNumber).jiraDate}}



Last modified on Nov 17, 2022

Was this helpful?

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