Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up parent task to have the same due date as child task

Leslie_Hernandez July 12, 2022

Hello everyone,

I am new to Jira and I'm having some issues setting up automations. 

I have a project with many task, and those tasks have child tasks, I noticed that the parent task has the last due date of the child tasks, is there is way I can set up the parent to have the earlies child task' due date? 

and if possible, once the first task is completed have the next due date show?

Thank you!

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
July 12, 2022

Hi @Leslie_Hernandez -- Welcome to the Atlassian Community!

It seems your project has an existing automation rule, or script addon, running which is making the change to the parent Due Date.

Please post images of your current rule and the audit log details, as that will provide context for the community to offer suggestions on rule changes.  Thanks!

Kind regards,
Bill

Leslie_Hernandez July 13, 2022

My apologies @Bill Sheboy , It looks like we do not have any automation rules. I believe due dates were entered manually. automation1.PNG

Would i still be able to create a rule so the parent task can pick up the earliest due date from the child tasks? child task.PNG

These are my current child tasks with due dates, but i want the parent to pick up the first task's due date since its due first. 

Bill Sheboy
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.
July 13, 2022

Hi!

Yes, that is possible with an automation rule.  Basically you decide the trigger (e.g. adding subtask, editing the due date, etc.), gather the sibling subtasks, and grab the smallest date to use.

Perhaps something like this:

  • trigger: issue created
  • action: re-fetch (this will slow down the rule and reload the data...which is often needed with this trigger type)
  • condition: issue type is subtask
  • branch: to the parent of the subtask
    • action: lookup issues with JQL to gather all of the sibling subtasks.  You may want to qualify this to ignore done issues.
    • action: edit the issue (parent) to see the due date to
{{lookupIssues.duedate.min}}

 

To get you started on creating your rule, please review this documentation and examples:

Like Taranjeet Singh likes this
Leslie_Hernandez July 13, 2022

This is what i have, automation2.PNG

I have not been able to figure out how to properly do the "Then: look up" step (second to last)

Thank you!

Bill Sheboy
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.
July 13, 2022

For your lookup issues JQL, you want to find the sibling subtasks of the same parent.  This can work for that from inside of the branch.

linkedIssue ={{issue.key}} AND issueType IN subTaskIssueTypes()

If you want to ignore the Done issues, add that part to the JQL:

linkedIssue ={{issue.key}} AND issueType IN subTaskIssueTypes() AND statusCategory != Done

Deleted user September 1, 2022

Dear @Bill Sheboy

I have a similiar problem, but it does not run as I imagined:

JIRA_Rule.pngJIRA_Rule_2.png

 

Why does it not find the siblings?

 

Thank you in advance.

Bill Sheboy
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.
September 1, 2022

Hi @[deleted] -- Welcome to the Atlassian Community!

Are you using a company-managed or team-managed project?

And...are you trying to do this for linked issues or parent/child relationships?  If parent child, please try updating the lookup issues action's JQL to check for parent instead of linkedIssue.

Kind regards,
Bill

Deleted user September 1, 2022

Hello @Bill Sheboy 

 

first of all thank you very much for your very quick reply. I would add that I am a new user to JIRA and not an IT specialist in any kind of way. I am also not a native English speaker. Considering these two fact, if any questions of mine sound rude or condescending, they are not meant to be. I am not trying to dismiss your argument or question, but rather trying to improve my understanding of the underlying processes.

 

Where can I see if it is either company-managed or team-managed project? Please also explain how do the differences change what I am trying to do?

 

I am also not quite getting what you mean by linked issues or parent/child relationships. I would like to update the due date for a tasks to the earliest among its sub-tasks.

 

Thank you for helping me!

 

Kind regards from Germany

Kriz

Deleted user September 2, 2022

This code is what I use to edit the Due Date:

{{lookupIssues.duedate.min}}

Deleted user September 8, 2022

@Bill Sheboy I found out that this is a team-managed project. 

Bill Sheboy
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.
September 12, 2022

Hi, Kriz.

I'm sorry for the delay in responding; I was out-of-office for a while.

I asked about Company-managed and Team-managed projects as they handle the connection between Epics and children differently...although that is changing and I believe the both can now check with {{issue.parent}}

Let's assume you mean issues (e.g. Story, Task, or Bug) and their subtasks.  Then let's try this:

  • Change the JQL for your Lookup Issues action to:
    • parent = {{triggerIssue.parent}} AND statusCategory != Done AND issueType IN subtaskIssueTypes()
  • After the Lookup Issues action, add an advanced compare condition
    • first value: {{lookupIssues.size|0}}
    • condition: greater than
    • second value: 0

That additional condition will help show if there is a problem matching the sibling subtasks before you attempt the edit of the parent.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events