How to sum the custom field value in all stories and display the total under the Epic


I am using AUtomation for JIRA currently.

Is there a way where I can add the custom number field of all the stories under an Epic and display the total in an Epic custom  field?



Story 1 = 10

Story 2 = 15

Epic field should display 25




3 answers

Hey Sruthi,

I answered your question on our internal support tracker, but I'll re-post the answer I had here.

In your case, you want to update the story points of three fields. To do this, you'll need to create three separate rules, one for each field. Each rule should look like the following photos show (and you can click 'Copy' on the main screen once you've created the first one to make this a lot easier):


Screen Shot 2017-12-15 at 10.41.49 am.pngScreen Shot 2017-12-15 at 10.41.56 am.pngScreen Shot 2017-12-15 at 10.42.02 am.pngScreen Shot 2017-12-15 at 10.42.07 am.pngScreen Shot 2017-12-15 at 10.42.12 am.pngIt's important to have the check for whether the Epic exists, or you'll run into some errors when the field is updated on a rule without an Epic.

Then in the box under 'Edit issue', you want to have the following text:

{{issue.Sum me up}}{{^issue.Sum me up}}0{{/}} - {{fieldChange.fromString}}{{^fieldChange.fromString}}0{{/}} + {{fieldChange.toString}}{{^fieldChange.toString}}0{{/}}

You should change the words 'Sum me up' to the name of whatever field you're changing at the time.

I hope this helps you and anyone else visiting these forums!


Hi Huw,

The above solution worked for any newly created Epics and stories.


But does not work for already existing Epic with stories & points

Initial Set

Story 1 =5

Story 2 = 5

So Epic = 0

Now i edit one of the Story to trigger the rule

Story 1 =10 

Story 2 = 5

So Epic = 5

It is only taking the point from the story that triggered the rule. Not going over the rest of the stories to calculate their points

Everytime the Story number field gets updated, then the rule should go over the stories and calculate the sum.





Hi @Sruthi Vijayakumar@Huw Evans,


Could you pls let me know what the 3 triggers would be.

1. Trigger when Custom sum field changes

What would be the other two. Also will this work even when the storypoint is changed to 0.

0 votes

Hi Sruthi,

There are a couple Communities posts that have provided some guidance on this.  One suggestion I have seen is to use EazyBI and you can find a post regarding this add-on at EazyBI - calculate sum of custom field values for issues in Epic?

There is also another knowledge base article from Arsenal you may want to look at as well titled Rolling Up Epic Time Estimates.



Hi Branden,


Thank you for responding.

EazyBi is mostly for reporting.


I want the the numbers under 'Custom Field X' of all the stories to add up and display under the 'Custom Field X' in an Epic.

I see automation in JIRA add-on allows that. But not sure how to configure it for a custom field in JIRA.


Sruthi V

Hey @Sruthi Vijayakumar,

Looks like you're already using Automation. But if you're open to trying another add-on, I'd recommend using Power Scripts.

With a few lines of code you can very quickly sum the custom field values and display them in another field when viewing the Epic.

Here's a short video tutorial that walks through exactly how to setup this sort of algebra. You'd just need to modify the issue types, and change to addition instead of subtraction, for your needs.

And here's the sample code used, just for reference:

//This script grabs values from the expense field in the issues subtasks
//and then subtracts them from the budget
string [] stasks = subtasks(key);
int budget = customfield_10714;
if(isNotNull(budget)) {
    for(string s in stasks) {
        if(isNotNull(%s%.customfield_10713)) {
            budget = budget - s.customfield_10713;
return budget;

Hope this helps!



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

469 views 8 27
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