Aggregate value of custom field with Script Runner

Hi,

i have a custom field which contains a numeric value reflecting the severity of a bug. Now I want to aggregate the severity of all open bugs. Script Runner offers the function aggregateExpression, but all related examples use system fields of JIRA (like e.g. Original Estimate). How can the function be applied on a custom field?

Thanks!

1 answer

Often, you can just input the field's name, all lowercased and without spaces. For example, the Story Points field:

issueFunction in aggregateExpression("storypoints.max()")

You can also use the custom field's unique ID, like:

issueFunction in aggregateExpression("customfield_10113.average()")

The custom field must be a number, date, or duration custom field. Scripted fields that return those values are admissible as well, but they need to return the appropriate data type, as determined by their searcher.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

933 views 5 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot