Automation rule to calculate Start and Due date based on linked issue

Munir Patel
Contributor
February 2, 2023

Can someone please look at the enclosed Automation and let me know why does it not calculate the Start and Due date for linked issue. Automation runs successfully but Start and Due date are not populated and I don't get any value for them on audit log too.Automation rule to calculate Start and Due date based on linked issue.JPG

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

Hello @Munir Patel 

If you print into your Audit Log the value of your variable {{xDueDate}} do you get a value?

I think the first problem is that when you create that variable you need to be setting it to {{issue.duedate}}

Munir Patel
Contributor
February 4, 2023

@Trudy Claspill thanks for the response.

The automation now runs giving values correctly but does only for one linked issue and if I add "refetch" then it runs for 10 subtasks and it stops after 10 giving loop message in audit.

 

I have like 14 subtasks that are linked under an issue and if I change the due date of one of the subtask I want to recalculate the start and the due dates of subsequent subtasks that are linked in sequence.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 5, 2023

Please show the rule details since you have changed it and the Audit log for the rule execution that has the "loop message"

Munir Patel
Contributor
February 6, 2023

Automation rule - Calculate due date for linked block issues.JPGLoop.JPG

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2023

Hello @Munir Patel 

Your rule is triggered when the Due Date is changed on a subtask. You then create a branch to find the issues linked to that subtask and update each of their Start and Due dates. Are those linked issues also subtasks? If so, then updating the Due date of those linked issues (if they are subtasks) could be causing this rule to be called again. That would be an execution loop that Jira is designed to prevent to avoid getting caught in an endless recursion.

Do your subtasks have more than one linked issue using the "blocks" relationship? Are any of those issues subtasks in the same project? Have you linked issues such that a given subtask may be blocked by more than one other subtask?

To ensure I fully understand your scenario can you provide a representation of a set of issues (subtasks, their parent issues, and their linked issues) where you detail how you want the first Due date change to cascade through the rest of the issues?

Munir Patel
Contributor
February 7, 2023

Hi Trudy, I am enclosing an example. In which...

PROD-526 is an EPIC

PROD-886 is a SKU [issue type user story]

PROD-887 to PROD-898 all the way...are the subtasks under the SKU

PROD-887 is linked/ blocks PROD-888

PROD-888 Is linked/blocks PROD-889

....

And so on until

PROD-897 is linked/blocks PROD-898

The set of subtasks remain the same for all SKU type and SubTask blocks only the next one in sequence.

 

Now if any of the Sub-Tasks due date is changed, I am changing the due date of the block task by calculating the due date of the task plus remaining estimate of the block task and updating the due date of the block task. Once due date of the block task is changed the same process will be repeated until it reaches the last block subtask.

What is happening is that the Automation works well but at count 10 which is PROD-897 it stops and displays Loop in the audit log. Atlassian has mentioned that repetition of the automation will stop after 10 counts and it does...

 

Please let me know if you have any question.

 

Thank you for all the time and efforts you are putting in to help. I appreciate it.

view - list of sub tasks where due date should change based on remaininng estimate and due date of linked issue type blocks.JPG 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2023

Hello @Munir Patel 

Thank you for that additional information.

I have not yet found a solution for this. You are hitting the loop limit described here. There does not appear to be a way to change that limit.

I found two other posts where similar the same type of problem was brought up.

In this one the original poster said the got around it by using Send Web Request to update the subtasks.

In this one there was no solution posted but there was a recommendation that the original poster contact Atlassian Support directly.

If you do contact support, please post back here what you learn.

Munir Patel
Contributor
February 8, 2023

Hi Trudy, thank you for the links and response. Atlassian support provided a workaround that resolves my issue for now. Not a great workaround but I would like to use this until some better solution is discovered.

I have created Automation rule#6.... and have created another automation rule#7 similar to rule#6 but have created it as a manual trigger.

rule #6 works until 10 count and goes to loop

rule#7 I have to run it manually from 10th subtask and it runs only for that issue and then

rule#6 restarts again automatically to complete the remaining 10....

I am enclosing both rules for references.

rule#6....is below

Autpomation rule#6......JPG

 

 

Similar to above rule#6..below is rule#7 created as a manual trigger....all other steps are similar to above....

 

Autpomation rule#7......JPG

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2023

Thank you for sharing your solution!

Suggest an answer

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

Atlassian Community Events