How can I use JQL to find all epics which have Total Story Points greater than 100 using Scriptrunne

Michael Veit July 15, 2021

How can I use JQL to find all epics which have Total Story Points greater than 100 using Scriptrunner issueFunction aggregateExpression with storyPoints.sum().

 

We are using a Data Center version of Jira.
We have Adaptavist Scriptrunner for JIRA installed.
We have a field available that totals the story points in an epic called “Sum Story Points Total”

I use the “Sum Story Points Total” field in column headers in Filters and Structures.
But it does not seem to be available in JQL to me.

How can I create a JQL filter that effectively does this:
               IssueType in (Epic) and “Sum Story Points Total” > 100

 

I’ve been looking at examples using aggregateExpression  with storyPoints.sum

Such as this:  issueFunction in aggregateExpression("Story Points", "storyPoints.sum()")

I’ve tried adding in an expression like this below with “ > 100” and the syntax is accepted, but the expression does not limit the returned records.

issueFunction in aggregateExpression("Story Points", "storyPoints.sum() > 100")

 and Project in (MyProject) and IssueType in (Epic)

 

How do I use an expression in the above statement to only get Epics that have 100 or more story points?  Or how would I otherwise do this using standard JQL and/or with Scriptrunner commands?

1 answer

0 votes
Marc Jason Mutuc
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 15, 2021

Can you share the configuration of the custom field? To be specific, what's the search template assigned to your custom field?

Suggest an answer

Log in or Sign up to answer