I use Lookup for calculating number of story points in an epic

Peter Bosse March 20, 2024

For our planning assessment we are using automation scripts to calculate the total number of story points in a given epic as part of a project. This works fine for some of the Epics however since there is a limit then we cannot have it working for all epics in the project. Any idea what we can do to increase the limit - or are there other solutions to calculate total amount of story points in an Epic if not by the Lookup function? 

 

My automation looks like this: 

jira automation script.jpg

 

I am getting this error message:

Lookup issues
A search during custom value definition found no issues.
There was an error executing a search during custom value definition: .
Custom Smart Value JQL Search: "(issuetype in (task) and "Epic Link" = "") AND (project in (10022))" - No issues have a parent epic with key or name ''

 

i also fails in the lookup JQL if i leave out the "Assigned area" in (SW) criteria... 

 

similar discussions in this thread: Solved: How do you sum up story points to the epic using j... (atlassian.com)

 

 

2 answers

1 accepted

1 vote
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 20, 2024

Hi @Peter Bosse 

This seems related to your other post here:

https://community.atlassian.com/t5/Automation-questions/Re-Re-How-do-you-sum-up-story-points-to-the-epic-using/qaq-p/2646010/comment-id/9764#M9764

 

If your epic does have more than 100 child issues, the limit cannot be changed; it is part of the REST API functions, which require paging above the maxResults limit. 

However if you can determine a way to split up the children on a field (e.g., component, labels, status, etc.) you could use multiple lookup actions and sum up the results across them using created variables.

Kind regards,
Bill

Peter Bosse March 21, 2024

Hi @Bill Sheboy yes correct its the same topic. You mention if we have 100 child issues in an epic, however that is not the case. I have tried splitting it up to also use "assigned area" as a field to determine if the tasks are related to SW or to HW for example. However i see that the script works for epics only up to a certain "number of epics" Any new epics wont work - even if i have only 1 child issue in it. That makes me wonder if there are other limitations. 

 

The error i am getting is that there is no epic with the name "" clearly meaning the list provided from the lookup does not include the epic. Comparing with another epic i made a month ago there is no difference and here the script is working. 

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 21, 2024

First, try changing that JQL for the Lookup Issues action inside the branch from this: 

AND "Epic Link" = "{{issue.Epic Name}}"

to this: 

AND "Epic Link" = {{issue.key}}

The reason is after the epic changes to sunset fields like Epic Name, that is not populated / required by default.  And so it may be null for many of your epics unless you explicitly filled it in.

 

If that does not work, change to this: 

AND parent = {{issue.key}}

At the same time of those epic field sunsets, the Epic Link was also deprecated.  The parent field is now used in the entire hierarchy to make things more consistent.

 

Like Trudy Claspill likes this
Peter Bosse March 21, 2024

@Bill Sheboy thanks. It seems that changing to 

AND parent = {{issue.key}}

does the trick. Thanks a lot for helping out.  

Like Bill Sheboy likes this
0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2024

Hello @Peter Bosse 

What limit are you encountering?

Peter Bosse March 21, 2024

Hi @Trudy Claspill,

please also see my reply above to Bill Sheboy. It seems the lookup function when using it for automation has a limit of 100 lookups returned in a table. until now this has worked fine, but we have a project with 200 Epics included (and about 1000 tasks). Doing an automation script  where i want to calculate and update the story points for each epic upon changing story points for one of the child tasks, the script only works for some epics up to a certain "number". It seems no matter what i do to split up the search criteria in the JQL search it still does not work. 

For example we have 68 epics for Software. So i have tried changing the automation scripts to require "assigned area" to be SW. None of the epics contains more than maybe 20 tasks, but when i create a new Epic, even with just one task in it, the script comes with a failure that the epic does not exist in the list from the lookup. 

Peter Bosse March 21, 2024

Just to try something else i changed the criteria to "Story" instead of Task in both the JQL and "issue type equals" branch (we dont use stories in this project so this should not hit the roof). made a dummy Epic with 1 story in it, modified the story points and i still get the same error. 

Suggest an answer

Log in or Sign up to answer