Updating the Due Date of the Tasks

Deniel Danielyan November 12, 2023

Dear Community,

We've definitely all worked with the simple ToDo, In Progress, Waiting (For Customer, For something...), Test, Done Status structure. However, I am very careful with due dates and tracking tasks, and I want to do the following.

Whenever one of the tasks is updated to the status "Waiting", I want the Due Date to update its value, to however long the waiting status was changed, for example, if the Due Date was tomorrow which is 11/14/23 and I changed it to Status "Waiting" for 2 days, I want the due Date to change to 11/16/23, and same for hours, months, etc.

I tried Jira Automations, but I can't seem to figure it out.

I think a lot of people would find this helpful :)

 

Thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted
Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2023

For this, you have to create one SLA Time which starts counting when the issue transitions to Waiting status and once the issue transitions back to another status you can get the time spent on that status and then you can use the smart values to add days in due date.

For e.g SLA started when issue transition to status Waiting then it transition to In Progress then the rule will trigger and get the elapsed time which you can use to add in Due Date, but note that you can only add days in due date not minutes and Hours.

Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2023

In this rule, I have get the elapssed time the customfield_10058 is my TimeToResolution SLA, I will get the elapssed time in milliseconds and convert it into Days by dividing to 86400000, then I use the smart value to add in Due Date which is {{issue.Due Date.plusDays(issue.customfield_10038.ongoingCycle.elapsedTime.millis.divide(86400000))}} and the result is perfect.






image.png

Deniel Danielyan November 13, 2023

Thank you for your Reply Muhammad!

I'm new to Jira and I'm having trouble following your guide. I'm sorry to have to ask this, but do you think you can maybe explain what's happening Step-By-Step?

Thanks in Advance

Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2023

Yes Sure,

Step 1: Go To Project Settings > SLA and Create the SLA name "Waiting Time" SLA Start time when issue status is Waiting and SLA met when issue status To Do, InProgress, Done

Step 2: Go to Custom Field and search for the SLA Name "Waiting Time" and retrieve its customfield ID.

Step 3: Create Automation Rule which triggered on Issue Transition from Waiting to any other status.

then use the smart value to update the due date, {{issue.Due Date.plusDays(issue.customfield_10038.ongoingCycle.elapsedTime.millis.divide(86400000))}}


Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2023

If it is not clear then do let me know I will create one video for you.

Deniel Danielyan November 13, 2023

Thanks for your help Muhammad!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events