Forums

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

How to find parent of Epic (1st level in Advanced Roadmaps) with "lookupissues" in a automation rule

jeroen_wilmes
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.
July 1, 2023

I want to add up the values of a customfield of all Epic in one Feature (1st level above Epic in our advanced Roadmaps). The feature issue is logged as the "parent link" in the Epics. 

parent = {{issue.key}},  doesn't work.

"parent link" = {{issue.key}}, doesn't work.

I have a similar automation to add the values of all stories under an Epic and that works fine. 

4 answers

2 accepted

1 vote
Answer accepted
jeroen_wilmes
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.
July 2, 2023

Hi Bill,

 

Thanks for wanting to help. 

I indeed think there is a problem with the "For: JQL "parent link" = {{issue.key}}. I'm afraid that it is related to the integration of Advanced Roadmaps.  I need to find the " parent link" from the Epic. A similar automation where I look for the Epic of a Story. That automation works fine.

please find the requested screen shots.Screenshot 2023-07-02 at 19.32.11.pngScreenshot 2023-07-02 at 19.31.45.pngScreenshot 2023-07-02 at 19.31.17.png

best regards

Jeroen

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.
July 2, 2023

Thanks for that information, and as a tip: please try to stick with one thread in responding.  That will help others see if there are multiple possible answers to a question.

Okay, looking at the rule's audit log, it seems to be showing multiple issues where found that are parents of the trigger issue Epic.  Is that what you expected?

Next, with the recent changes to the epic fields, I recommend trying each of your rule's JQL stand-alone with example issues.  That will confirm which field to use for the parent/child linkages...and the correct direction.

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.
July 1, 2023

Hi @jeroen_wilmes 

When something with parent/child relationships does not work with JQL in lookup issues, the cause may be the context of the rule action (i.e., where we are in the execution).

To help diagnose this, would you please post images of your complete automation rule, including the details of your lookup issues action, and of the audit log details showing the rule execution?  If you have a longer rule, please try to use a screen capture which scrolls the browser; that will put the rule in a single image.  Thanks!

Kind regards,
Bill

jeroen_wilmes
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.
July 3, 2023

I splitted the automation rule. It seems to be that the problem primarily is in the branching.

If get the message:

Branch rule/ related issues

Error searching for related issues. This is most likely because the following issues don't have a related issue of the type you specified. Try narrowing your search to only include issues that contain links to related issues:

FOR-22: "((FOR-22 = "parent") AND (key != FOR-22)) AND (project in (24375))" - Field 'FOR-22' does not exist or you do not have permission to view it.

 

I tried it with "parent" and with "parent link" none is giving results.
Can I use automation for issues in Advanced Roadmaps?  

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.
July 3, 2023

Some of the fields in advanced roadmaps are not available in automation rules yet.  That is why I was suggesting trying your JQL stand-alone with Advanced Issue Search first to confirm it works as you expect.  For example, the initial rule seemed to return too many Features for the trigger issue, Epic.

Would you please post an image of your new rule for some context, showing the details of the branch, and of the audit log details?  Thanks!

jeroen_wilmes
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.
July 3, 2023

The new rule:

Screenshot 2023-07-03 at 15.33.11.png

I run it also with "parent link" instead of "paren" both with cp the same result:

 

Screenshot 2023-07-03 at 15.32.02.png

I think we tend to the same conclusion: the automation does not yet support looking for upper-level issues above Epics.  I created a support ticket for Atlassian to look into this.

Like # people like this
1 vote
jeroen_wilmes
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.
July 5, 2023

With some great help of @Vaibhav Revankar  I solved the problem for adding the values of a custom field of childs in the customfield at parent level, where the parent level is above the Epic.

Screenshot 2023-07-05 at 14.40.22.png

I have now three of these automations. to cumulate the cost and budget from level 1 upto the toplevel. Per automation it does work. Together it seems to be random. 

Is there a way to make sure automation rules run in predefined sequence?

Vaibhav Revankar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2023

When you say that automation rules need to have a predefined sequence, we can make that happen by enabling the checkbox in the "Rule Details" page "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule."

If this option is enabled on a automation rule, we can trigger the current rule as a result of the previous run rule.
Screenshot 2023-07-05 at 8.33.33 PM.png

Which means, if we have Automation A which has a Action to "Edit a issue field" and Automation B which has a Trigger that fires on "Field Value Changed" of the above field. Then, checking the aforementioned option in the "Rule Details" page will execute the rule B as a result of Rule A.

These can be chained as well. What
 you can do is enable this checkbox in the Story -> Epic budget update rule and in Epic -> Parent rule as well and so on. However, do not check the box on the first sub-task to Story budget calculation.

What this will do is, whenever you update the budget on Sub-task, the Story will get updated. This update will trigger the rule (thanks to the checkbox in the "Rule Details" page) for Story and update the Epics. Once Epic is updated, again the rule will trigger due to the checkbox enabled will update its Parent and so on move forward higher up in the hierarchy. This will stop at the highest hierarchy and not get into loop as once the last rule is run and even if sub-task is updated, It won't trigger the first rule.

So the start will still be manual update of the Budget field by a human user and then trickle the changes in auto mode from bottom to top.




jeroen_wilmes
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.
July 5, 2023

I configured like you advised, and it works as expected, YEAH!

With both the automation logic and the sequence check-box, I can create an "equivalent" of the roll-up for storypoints in advanced roadmaps, but then for custom fields. which is valuable for a.o. budgets

Screenshot 2023-07-05 at 17.20.43.png

0 votes
Vaibhav Revankar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2023

Question: Is there a way to make sure automation rules run in predefined sequence?

When you say that automation rules need to have a predefined sequence, we can make that happen by enabling the checkbox in the "Rule Details" page "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule."

If this option is enabled on a automation rule, we can trigger the current rule as a result of the previous run rule.
Screenshot 2023-07-05 at 8.33.33 PM.png

Which means, if we have Automation A which has a Action to "Edit a issue field" and Automation B which has a Trigger that fires on "Field Value Changed" of the above field. Then, checking the aforementioned option in the "Rule Details" page will execute the rule B as a result of Rule A.

These can be chained as well. What
 you can do is enable this checkbox in the Story -> Epic budget update rule and in Epic -> Parent rule as well and so on. However, do not check the box on the first sub-task to Story budget calculation.

What this will do is, whenever you update the budget on Sub-task, the Story will get updated. This update will trigger the rule (thanks to the checkbox in the "Rule Details" page) for Story and update the Epics. Once Epic is updated, again the rule will trigger due to the checkbox enabled will update its Parent and so on move forward higher up in the hierarchy. This will stop at the highest hierarchy and not get into loop as once the last rule is run and even if sub-task is updated, It won't trigger the first rule.

So the start will still be manual update of the Budget field by a human user and then trickle the changes in auto mode from bottom to top.

Suggest an answer

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

Atlassian Community Events