I have looked through the automation references and other similar automation rules but cannot get my automation to work and would love some insight on what the problem is.
Attached is the log debug statements. Thanks in advance
Hello @Carol Wesolowski
Welcome to the Atlassian community.
Concerning this part of your rule:
To use the {{lookupIssues}} smart value you must first have used a Lookup Issue action. I believe you should be using that action instead of the Branch For Children, in this case. The Branch For Children changes the focus of the rule activity from the parent Epic to the child issues, and would execute each action under the branch for each child.
Instead you should use the Lookup Issues action to execute a JQL that will retrieve all the child issues of the parent Epic that triggered the rule.
Then you get the sum of Story Points for all the issues returned in the Lookup Issues action with this smart value:
{{lookupIssues.Story points.sum|0}}
And you won't need to create or use a Variable at all.
Hi @Carol Wesolowski -- Welcome to the Atlassian Community!
Your rule can be simplified to use the Lookup Issues action with JQL to find the sum. For example:
The branching you show is not needed and will not work as I believe you expect:
Branches in rules which could be on more than one thing run in parallel and asynchronously, and so each item / loop runs independently. This improves rule performance, although it requires we think differently about rule design as there is no guarantee of when the branch will finish, up until the last rule step, and nothing passes back out of the branch.
There is no way to accumulate the results back out to a created variable outside of the branch or between each loop.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill, I am having difficulty with the JQL query to lookup the child issues.
{{lookupIssues.IsChild}} does not work. Help in formatting the query would be much appreciated.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Carol Wesolowski
In the Lookup Issues action you need to provide a JQL statement to get the child issues of the Epic that triggered the rule. You use the same type of syntax you would using in the View All Issues screen, but in an Automation Rule you can use Smart Values to insert values from the issues in the rule.
So, to get the child issue of an Epic you would normally use:
parent=<Issue key of Epic>
In the rule you can reference the issue key of the Epic that triggered the rule in the JQL, as shown below
Then add an Edit action to edit the Epic and put into the field of your choice the sum of the story points from the issues found by the Lookup Action.
The "|0" in the smart value is to insert a value of 0 if the Lookup Issues action did not find any matching issues (children of the Epic that triggered the rule.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trudy and Bill, thank you both for the help! Automation is now working as intended.
~Best, Carol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's great, Carol!
If our responses have helped you solve your requirement, please consider clicking on the Accept Answer button above the response thread(s). That will mark you Question as Solved, and help others searching the community find the posts with validated solutions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.