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:https://community.atlassian.com/t5/Jira-questions/Can-I-automatically-set-the-due-date-of-a-parent-issue-to-the/qaq-p/101813
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.https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/
Please, find a screenshot with my flow attached.
https://drive.google.com/file/d/1PcV_OGJ5rQw_pzNy4KKDjdHSUNW4yQ4P/view?usp=sharing
Also welcome for any other ideas how to setup that all.
Thanks.
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:https://drive.google.com/file/d/1PcV_OGJ5rQw_pzNy4KKDjdHSUNW4yQ4P/view?usp=sharing
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: https://drive.google.com/file/d/1IraXhsTvM3aQ8PprITrSdiuV0ennJK7M/view?usp=sharingFor Stories/Tasks: https://drive.google.com/file/d/1XcWnKyDIeLEiQ3P9R3qvhDN3B-LZU8wN/view?usp=sharingSo, 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:
https://drive.google.com/file/d/1hHjg59yQSf7XfoawFET_uCYffjC0ENYv/view?usp=sharing
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.
Simply change your JQL from this:
{{triggerIssue.fields.duedate}}
To this:
{{triggerIssue.duedate}}
to eliminate that message. You don't need to use the .fields accessor in the smart value.
Several concerns for you to ponder and maybe address, based on what I see here...
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:
https://community.atlassian.com/t5/Jira-Software-questions/Automation-order-of-operations/qaq-p/1593672
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.
@Dmitry Nekrasov , I tried this and it worked.
Hello @Dmitry Nekrasov @Mykenna Cepek
you do not need to use smart values for this automation:
1. When Value changes for Due Date
2. For: Parent
3. condition: Due date is before Due Date from the Trigger issue
4. Then : Edit issue field: Copy Due date from trigger issue
It looks like you're new here. Sign in or register to get started.