Forums

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

Parent (epic) set start and due date on base of child tasks

Antonio Campagna March 15, 2023

Hello Team, 

I'm very new with Jira Automations,

I need a rule for updating advanced roadmap gantt epics and related parent start and due date from child tasks:

min task start date and max task due date

pls, a very simple solution is required, there a lot of them in this community which are quite complex for my know how

Many thanks for help

1 answer

1 accepted

0 votes
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.
March 15, 2023 edited

Hi @Antonio Campagna 

One reason you may find complex solutions for this use case is there are a lot of variables...depending on your situation.

One possible basic rule for this could assume it is triggered manually from an epic:

  • trigger: manual
  • condition: issue type is Epic
  • action: lookup issues with JQL to gather the child issues for the epic
  • action: edit the issue to set the dates
    • start date: {{lookupIssues.Start date.min}}
    • end date: {{lookupIssues.duedate.max}}

 

Now comes the variation/complexity...what do you want to do when...

  1. the dates change in a child issue
  2. a child is removed from the epic
  3. a child is added to an epic
  4. a child changes its parent epic
  5. a new child is created, and assigned to an epic, in one step
  6. a child issue is deleted / abandoned from scope
  7. which child should be included in the date changes: not started ones, non-done ones, all of them
  8. a date field in a child is cleared
  9. someone manually edits the date fields in the epic
  10. and so on...

Using the basic rule requires you to remember to run it, and creating more rules to handle your needs makes it a bit more auto-magic.

Kind regards,
Bill

Antonio Campagna March 16, 2023

Hi @Bill Sheboy 

I see and your are right about concern on complexity, I'm learning and I'll check it out later, I'll back to this discuss.

Your basic rule it's a good stating point for understanding the Automation scriping logic; 

for the being time I don't have idea how can write following statement 

action: lookup issues with JQL to gather the child issues for the epic

Can you help me?

Screenshot 2023-03-16 at 10.11.31 AM.png

thanks and regards

Antonio

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.
March 16, 2023

I believe the JQL for the lookup issues action would be:

"Epic Link" = {{triggerIssue.key}}

That should return all issues which are children of the trigger issue, the epic.

Antonio Campagna March 17, 2023

Hi Bill

it's works properly! thanks

  • trigger: value changed for sprint
  • action: edit the issue to set the dates
    • start date: {{issue.sprint.last.startDate.jiraDate}}
    • end date: {{issue.sprint.last.endDate.jiraDate}}
  • For Epic (parent)
  • action: "Epic Link" = {{triggerIssue.key}}
  • action: edit the issue to set the dates
    • start date: {{lookupIssues.Start date.min}}
    • end date: {{lookupIssues.duedate.max}}

 

Screenshot 2023-03-16 at 4.03.37 PM.png

I'm wondering if there some solution to refresh page after trigger is completed, in oder to see data set without F5

Regards

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.
March 17, 2023 edited

No, there is no built-in, automatic way to refresh the page after the rule runs.

Next, when you reference {{issue.sprint.last}} that is not necessarily the latest sprint, as the order of the sprints within the field could change.

Perhaps instead try {{issue.sprint.startDate.max.jiraDate}} to see if that works.

Antonio Campagna March 20, 2023

Hi Bill, 

not clear where are you refereeing to:

{{issue.sprint.last}} 

instead try {{issue.sprint.startDate.max.jiraDate}}

thanks

Antonio Campagna March 20, 2023

I just need to have on task same start/due date of sprint where is related 

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.
March 20, 2023 edited

I was noting that the list function last returns the last item in a list...with no regard to an desired ordering.  If the list is in the correct order, you are okay, however...if you needed the the most recent item by date, consider using another method to find that value.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events