Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Looping of maximum epic date and assign to initiative in jira automation

Dwaipayan Dey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2022

Hello,

I have a project that has multiple initiatives (INT-1, INT-2 etc) associated. Under each initiative there is two or more epics. As an example:

INT-1 has EPIC-1 and EPIC 2

INT-2 has EPIC-3 and EPIC 4

Using automation I am trying to get the maximum actual end date of epics under initiatives and automatically assign it to "baseline date" field of each initiatives.

As an example -

Maximum Actual end date of of Epic 1 and 2 will be assigned as baseline date of INT-1.

Maximum Actual end date of of Epic 3 and 4 will be assigned as baseline date of INT-2.

and the loop goes on till there is end of initiatives.

Any support will be helpful.

Automation.JPG

1 answer

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.
November 29, 2022

Hi @Dwaipayan Dey -- Welcome to the Atlassian Community!

There are a few things to check for your rule, as you have shown it...

When you note the field "actual end" is that a custom field you added, or do you mean another field?  Whatever your field is, please use this how-to article to learn if your field is supported by automation rules, and what the exact smart value name is: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Next, you do not show the JQL for your rule, and I suspect it has a problem.  Let's clarify a bit...how are you trying to run this rule: triggered based on the Initiatives or something else?

If it is based on the initiatives, then:

  • The JQL for the trigger should only include initiatives
  • And the lookup issues action should use JQL to find the related epics with the same Initiative as parent.  Then the check on the max date will work as you expect.
  • And finally the branch to parent would not be needed, as each Initiative from the trigger is processed, it can be edited

Kind regards,
Bill

Dwaipayan Dey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2022

Hi @Bill Sheboy , Thanks for your prompt reply.

Regarding your questions -

1. "Actual End" is a custom field added which can show only dates.

2. Trigger for this is -  weekly scheduled run (Once in a week) or a manual run.

To Simplify here is the flow -

Scheduled Run/Manual Run -> search for initiatives -> search for epics under each initiatives -> group epics under each initiative -> get the max date (custom field - actual end date) from epics and apply it to "baseline date" (Custom field of initiative) of parent initiative -> Loop the process till all initiatives are updated with correct baseline dates.

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.
November 30, 2022

Thanks for that information.

If your scheduled trigger is indeed using JQL to only find the Initiatives, using the Lookup Issues on the epics for each Initiative should work.  As are reminder, the branch to parent is not needed.

What is not happening as you expect, as your rule could be:

  • trigger: scheduled on JQL to gather the initiatives
  • action: lookup issues on JQL to get the epics for the current initiative
  • advanced compare condition: to check there were any lookup results
    • first value: {{lookupIssues.size|0}}
    • condition: greater than
    • second value: 0
  • action: edit the initiative to set the date to the maximum from the lookup

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events