Automation that changes the parent due date and all related subtask due dates
Asked by glen_adams_bellmts_ca:

<https://community.atlassian.com/t5/Jira-questions/Re-Change-the-due-date-of-all-tasks-and-subtasks-of-the/qaq-p/2381644/comment-id/634687#M634687>

Hi there, this automation does what I want it to do, however the subtask is getting the old due date from the parent. Here is my scenario:

The user is updating a field (Network Type) in the parent to one of 3 values (Simple, Standard, Complex). The automation will kick in and change the due date on the parent as follows:

Simple = {{issue.created.plusBusinessDays(20)}}

Standard = {{issue.created.plusBusinessDays(20)}}

Complex = {{issue.created.plusBusinessDays(60)}}

This part of the automation works great

When the automation branches to the subtasks I set the subtask due date to {{triggerIssue.duedate}}

Unfortunately, the subtask due date is set to the original parent due date, not the updated date.

How can I fix this? Thanks in advance.


Answers:
author: Samuel Gatica
body: Hi Glen  

It may be advisable to include a re-fetch component before updating the subtask to ensure that the automation retrieves the most current data from the issue.

Ref: <https://support.atlassian.com/automation/kb/usage-of-refetch-component/>

<br />

Best regards

Sam

comments: author: glen_adams_bellmts_ca
body: Thanks Sam, I think this is cloud only. my JIRA is internally hosted.


author: Samuel Gatica
body: Hi [@glen_adams_bellmts_ca](/t5/user/viewprofilepage/user-id/5559610)

You will need to create a new automation that triggers whenever the due date is updated, as the current automation is caching the due date and there is no method in DC to reflect the data accurately.

The process in the Cloud is straightforward, as it allows for the utilization of the Re-Fetch component.

Hope this helps

Sam


author: Bill Sheboy
body: Hi [@glen_adams_bellmts_ca](/t5/user/viewprofilepage/user-id/5559610) -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

If you followed the examples in that linked thread, you may have a problem in either the branches or in the smart value used to change the dates. Seeing the details of your rule and the audit log will help confirm the cause.

Kind regards,  
Bill

comments: author: glen_adams_bellmts_ca
body: Thanks Bill, here are some images:

For the Simple network type:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/339802i3F9891C53E9044CC/image-size/large?v=v2&px=999 "image.png")

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/339803iEA3BEBC3EE9C0F4A/image-size/large?v=v2&px=999 "image.png")

Then later in the automation:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/339804iF0FFF15E4C15D155/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/339805i448B1740A7C39339/image-size/large?v=v2&px=999 "image.png")

I hope this helps


author: Bill Sheboy
body: Please show **your entire in one image for context**. For longer rules, you may capture the image with an app or browser addon to scroll the page.

Please also show **an image of the audit log details for the rule execution**. That will show which rule steps happened, and allow comparison to what you expected.


Tags: automation

data-center

jira-data-center