Forums

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

Help Needed!!! Project Rule Automation for Updating Epic Start and End Dates

Brett Andrews December 1, 2023

Hi Atlassian community,

I am hoping someone would be of assistance. For the past week I've been banging my head up against the wall. I am a project manager running a team-managed project and to make life easier I'm trying to include automation rules into the project. One of the items I am trying to do is have Task and Epic start and due dates be updated to the min/max date respectively for their child tasks and sub-tasks. I have been able to successfully have Tasks Start and Due dates be updated however, I am struggling with epic start and due dates. I am hoping someone could provide advice as to what I'm doing wrong. Any advice will be more than appreciated. Details Below:


Environment:

  • JIRA Software (Cloud)
  • Team managed project
  • Issue Type Heiarchy: Epic>Task>Sub-task

Rule Details:

Epic Min-Max Dates_Rule Details_(2).pngEpic Min-Max Dates_Rule Details_(1).png

Automation Rule:

I know my rule is a little messy, I've been struggling to debug this for a while.

Epic Min-Max Dates_Rule_(1).pngEpic Min-Max Dates_Rule_(2).pngEpic Min-Max Dates_Rule_(6).pngEpic Min-Max Dates_Rule_(3).pngEpic Min-Max Dates_Rule_(4).pngEpic Min-Max Dates_Rule_(5).pngEpic Min-Max Dates_Rule_(6).pngEpic Min-Max Dates_Rule_(7).png

Audit Log:

Epic Min-Max Dates_Audit Log_(2).pngEpic Min-Max Dates_Audit Log_(3).pngEpic Min-Max Dates_Audit Log_(1).pngEpic Min-Max Dates_Audit Log_(4).png

3 answers

0 votes
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.
December 1, 2023

Hi @Brett Andrews -- Welcome to the Atlassian Community!

Adding to the suggestions from Laurie...

Are you trying to perform one or both different updates in one rule or multiple rules?

  1. When the Due Date or Start Date change for a Sub-task, update the parent issue (e.g., Task) to have the minimum Start Date and the maximum Due Date for any sibling Sub-tasks with the same parent
  2. When the Due Date or Start Date change for a Task, update the parent issue (e.g., Epic) to have the minimum Start Date and the maximum Due Date for any sibling Tasks with the same parent

Also, you do not need to use {{#debug}} when writing a message to the audit log.  That smart value / operator is used when you want a debug message for an action like Edit Issue.  Please look here to learn more about that: https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/#2.-Debugging-smart-values

Kind regards,
Bill

0 votes
Trudy Claspill
Community Champion
December 1, 2023

Hello @Brett Andrews 

Welcome to the Atlassian community.

You said the rule is not working. In what way exactly is it not working?

The log indicates the Epic is being edited. Are the fields not getting updated as you expect? If they are getting updated in some way that doesn't match your expectations, exactly what update is being made?

One potential issue I can see is this step where you are trying to retrieve all the child issues of the parent where the child issue Due Date is not empty:

Screenshot 2023-12-01 at 11.29.10 AM.png

You should not be using {{issue.duedate}} in this filter. That is pulling into the filter the actual value of the Due Date field of the issue referenced by the branch - the Parent issue - so your query is actually saying  "AND <the value in the Epic's due date field> IS NOT empty". If you want that to get all the child issues where the Due Date of the child issue is not empty then you need:

"Parent" = {{triggerIssue.epic.key}} AND duedate IS NOT empty

 

It also looks like you have a second Lookup Issues action and a second Edit action trying to edit the Due Date field of the parent epic in the same branch. That will overwrite the Lookup Issue results and Due Date editing from the first set.

Additionally the second Lookup Issues action doesn't appear to have a valid JQL.

Screenshot 2023-12-01 at 11.34.11 AM.png

 

And then the Lookup Issues action you are using for the child issues for the Start date is also invalid, as reported in the rule execution audit log.

Screenshot 2023-12-01 at 11.37.27 AM.png

Here you should be using a JQL similar to the first one you used to lookup child issues based on non-empty Due Date, with the correction I mentioned for that issue where you insert the field name "Start date" where I corrected the first JQL to say "duedate"

0 votes
Laurie Sciutti
Community Champion
December 1, 2023

Hi @Brett Andrews and welcome to the Community.  Your rule is using the Parent branch (typical of sub-task / Story, Task relationship).  Should you be using the Epic branch instead?

Snag_b388a5c.png

Brett Andrews December 1, 2023

Hi Laurie, 

I did consider that but I was hesitant use that as I get a warning that Atlassian will be doing away with that Branch Rule.

Epic Min-Max Dates_Branch Rule.png

Suggest an answer

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

Atlassian Community Events