Good afternoon :)
I have created an automation rule the looks up all the child issues of an Epic then totals up ({{lookupIssues.Story Points.sum}}) and stores the result in the Story Point field of said Epic.
Currently I am trying to do the same for an Initiative with no success. Same rule, same JQL to find child issues. When I check the Audit Log the "Lookup issues" step says "A search during custom value definition found no issues."
When I run the JQL from the JQL query line I get 61 results.
I am having trouble understanding why this works for Epics but not Initiatives.
Any ideas or thoughts would be much appreciated. Thank you.
Hello @Francis Calderisi
Welcome to the Atlassian community.
Can you show us the results of the JQL query using the issue key shown in the log? I want to see the Issue Types for the issues in the results. The other information can be obscured.
Hi Trudy,
This is what I am getting...
It is a mix of Story, Task, Bug and Epic issue type.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Francis Calderisi
What is the Scope of the rule from the Rule Details page?
The Lookup Issues action is able to retrieve issues only from the projects that are listed in the rule Scope.
I notice that the issue that triggers the rule in in the RM project. In the image you provided from the Issues screen I see that the issues being retrieved are in other projects. In order for the Lookup Issues action to retrieve those issues you will have to make the rule a Multiple Project Scope rule and name each of the projects that might have an issue under the hierarchy of the RM issue. Or you can set the project Scope to Global to search all projects in Jira.
You might then want to add Conditions after your Trigger to ensure that the rule will continue only when the trigger is activated by changes in your intended source project vs. all the projects in scope.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much @Trudy Claspill, I was not aware of this...
I will give it a try and see if this fixes my problem.
The other issue I imagine will sometimes come up is if their are more than 100 child issues. I saw in some documentation that the Lookup Issues can return "up to" 100 results.
But first lets get some results :)
Thanks again Trudy for the valuable insight.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is correct. That limitation is documented here:
https://support.atlassian.com/cloud-automation/docs/automation-service-limits/
One way to work around this would be to:
1. Update the sum stored in the initiative to 0 at the beginning of the rule. Then re-fetch the issue.
2. Use a Lookup Issues action that is more constrained; for example limit it to a particular issue type for the retrieved children. Find ways to constrain the results to less than 100 issues.
3. Edit the Initiative to add the sum from those issues to the current sum value (which is 0) in the initiative. Then re-fetch the issue.
4. Use another Lookup Issues action to get another set of issues, ensuring that the criteria does not overlap the first Lookup Issues action.
5. Edit the Initiative to add the sum from those issues to the current sum value (which is currently the sum from step 3) in the initiative. Then re-fetch the issue.
Repeat steps 4 and 5 until you have covered all possible child issues of the initiative.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francis - Welcome to the Atlassian Community!
If you put the lookupIssues code into the Advanced search function and then use the value of the Initiative key - does it return anything?
In other words, execute this as a filter:
issue in portfolioChildIssuesOf("RM-263")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good morning John,
Yes, when I execute the JQL in the Advanced Search it returns 61 issues.
Which is why I am surprised that the lookup issues is giving me the message that no issues were found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then it's probably related to the scope of the rule. Try changing it to a Global Rule and see if it returns issues in the lookup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.