Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira Automation: Parent issue due date based on children issues due date


Hi guys,

I'd like to setup automation for my Epics' due dates based on the due dates of all issues inside these Epics.

I've found this thread and tried to repeat the same flow via Automation in Jira, but it doesn't work at all:

What am I doing wrong?


Here in Documentation it's also mentioned, that I can use {{triggerIssue}} smart value, but everything stops working with it.

Please, find a screenshot with my flow attached.

Also welcome for any other ideas how to setup that all.



3 answers

@Dmitry Nekrasov , I tried this and it worked.

Automation Rule.png

0 votes
Mykenna Cepek Community Leader Jan 28, 2021

Several concerns for you to ponder and maybe address, based on what I see here...

  • As written, this rule will trigger for a "Due date" field change for any issue in any project. That's probably excessive, especially when I see the first conditional focusing in on just one project. Just want to ensure you understand that the trigger applies to all issues in the entire Jira instance that change based on the trigger settings -- moderated only by the projects that the rule might be set to under "Rule details".
  • Your second conditional combines Issue Types at two different levels of the Jira hierarchy: Story/Task/Bug (all at the "story level") and Sub-task/Sub-bug (at the "sub-task level"). It's important to realize that the parent relationships are different at different levels. For example:
    • issue.parent only works when the issue is at the "sub-task level", allowing you to go from a Sub-task to its parent Story.
    • You need to use issue.epic instead when the issue is at the "story level", and you want to go from a Story to its Epic.
  • The first two conditionals after the trigger act as filters, terminating the rule early when a condition fails for the triggered issue. Note those conditionals do not impact later JQL in the rule. So as written, your "Related issues condition" could access issues outside the SDJP project. Example: the triggered issue is an Epic in the SDJP project, but that epic has stories from other projects.

One reason you might see no action being taken, for example, is that the triggered issue was at the "sub-task level", and so the "For epic (parent)" branch won't do anything (because the parent of a Sub-task is a Story, not an Epic).

Adding some "Audit log" debugging can help you understand what's working and not working as you expect. I outlined some examples recently in this other post:

1. The filter for project is just for the test period. After I setup all correct, I'll delete it.

2. The second condition also works correctly. When I delete the 3d condition, all automation works fine.

3. All issues are inside the single SDJP project.

4. I make tests with Story level changing it's due date. Also, as I mentioned above, when I use the same flow for Statuses - everything works.

0 votes
Mykenna Cepek Community Leader Jan 27, 2021

Hi Dmitry. You have some really good questions here.
_ _ _ _ _ _ _

The first thread you mentioned is a few years old. I contributed to it today, both updating it with new information (that might help you), and also to provide some additional warnings about the approach outlined there.
_ _ _ _ _ _ _

The {{triggerIssue}} smart value should work, I use it often. I didn't see a screenshot in your original post, so I'm not sure what problem you have when you try to use it.
_ _ _ _ _ _ _

Back to your overall question though, it is currently quite challenging to set the "Due Date" in an Epic based on the Due Date of child issues. In my opinion, it should be easier. But the features available in Jira Automation as of right now make it much harder than it should be.

A question for you: do you want the Epic Due Date to be based on just the Stories, or on the Stories and any Sub-tasks?

As I noted earlier, it's nearly trivial to keep the Due Date of a Story in sync with all the Sub-tasks for that Story.

However, keeping an Epic Due Date in sync with all its child Stories is pretty challenging.
_ _ _ _ _ _ _

Before I write more, I'll let you respond to what I've written so far.

Hi @Mykenna Cepek , thanks for your reply.

I've attached the screenshot link in my post above, I'll duplicate it here also:

Answering your question:
- A question for you: do you want the Epic Due Date to be based on just the Stories, or on the Stories and any Sub-tasks?
- Yes, I'd like Epic Due Date be based on all children Stories, Tasks and Sub-tasks.
I've got the same automation already set up for Epic Status based on all statuses of children issues within this Epic.
It consists of 2 automation flows:
one for Stories Status based on Sub-tasks/Sub-bugs statuses,
and the 2nd for Epics based on Stories/Tasks statuses.
Please, take a look at these screenshots:
For Epics:
For Stories/Tasks:
So, I assumed I could set up the same automation flow for Due Dates, but it seems that the condition with {{triggerIssue}} doesn't work.

@Mykenna Cepek

Well, I've found my first mistake.

- Related Issues Condition module has to be inside the Epic branch.

Here is a screenshot:

But now I've got the next error:

JQL search failed for some issues. This is most likely because the JQL with smart-values was not valid for this query:"("cf[10008]" = SDJP-1 or (parent = SDJP-1 and issuetype in standardIssueTypes())) AND ('duedate' is EMPTY OR '2021-02-26' > 'duedate')" - Field '2021-02-26' does not exist or you do not have permission to view it.

Mykenna Cepek Community Leader Jan 28, 2021

Simply change your JQL from this:


To this:


to eliminate that message. You don't need to use the .fields accessor in the smart value.

@Mykenna Cepek ,

I've already tried that and it didn't help, I received the same error message:

Mykenna Cepek Community Leader Jan 28, 2021

I also just want to remind you that what you're trying to do is quite complicated. Unless you're willing to spend a lot of time figuring this out, you might want to re-evaluate the cost/benefit for this. As I mentioned earlier, it should be easier -- but currently it's not. Many known issues in automation will be in your way. Smarter people than me have tried and given up.

Have you looked at Roadmaps (aka Plans) at all? They automatically roll up the dates in child issues for you -- no automation needed. I realize it's a different approach and a different view. It also doesn't update the dates in the issues.

But if your goal is to eventually visualize the aggregate dates, that might be an easier way to get there.

Mykenna Cepek Community Leader Jan 28, 2021

Responding to:

I've already tried that and it didn't help, I received the same error message:

I suspect you still have quotes around the smart value.

Don't use this:


Use this:


Putting quotes around it will first substitute the smart value result (a date) and then the JQL will try to interpret that date as a Jira field. The quotes are the problem.

Well, I use "Plans" also for visualisation and for quick epics search, but it doesn't work in cases when a new issue is created and the due dates of parent issues have to be changed.

All of this had been working successfully for more than 1 year in BigPicture add-on, but now they have technical issues with Quick Filters, so I'd like to set up this via Jira Automation, and I believe that it's not so complicated as you say.

I just need to understand, why {{TriggerIssue.dudate}} returns the correct date, but gives the error message "Field '2021-02-26' does not exist or you do not have permission to view it."

When we understand that, the problem will be solved.

I've also tried without quotes, and it didn't help.

It returns the same response:

"("cf[10008]" = SDJP-1 or (parent = SDJP-1 and issuetype in standardIssueTypes())) AND ('duedate' is EMPTY OR 2021-03-02 > 'duedate')" - Field '2021-03-02' does not exist or you do not have permission to view it.

Mykenna Cepek Community Leader Jan 28, 2021

Wow. I wouldn't have believed it. But I just discovered that a plain JQL-based issue search (completely outside of automation) will fail on this:

2021-03-02 > duedate

but will succeed on this:

duedate < 2021-03-02

So just reverse the operands in your comparison (and invert the compare operator), and see if that works.

The rule config you have in the last screenshot looks correct from a syntax POV, but not sure if the logic is 100% correct at the moment, the "Related issues" conditions will only match true if *all the stories in the Epic* either don't have a due date, or the due date is < than the triggering issue. Is this the logic that you want? Or just that the Epic's due date is null or less that the triggering issue? If so you don't need to use the related issue condition and should us the JQL condition instead.

If the logic _is_ that the condition needs to match for all stories within the Epic, you'd still need to exclude the current issue (since the current issue is still part of the same Epic). You could get around this by changing the logic to be <= rather than < (which will evaluate false, since you're trying to compare to itself)

Anna-BigPicture Marketplace Partner Jan 29, 2021

Hello @Dmitry Nekrasov

Please let me update you on Big Picture problems with JQL filters. We have already completed work on fixing the bug, and its current status is “Waiting for the release.”
We plan to release the bugfix version in the first week of February.
If you have further questions, I will gladly answer them.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,469 views 37 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you