Degraded performance Customers may experience issues using Community search. Our team is investigating.
It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
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?
Example:
Story 1 = 10
Story 2 = 15
Epic field should display 25
Thanks,
Sruthi
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.
Cheers,
Branden
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.
Thanks,
Sruthi V
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):
It'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!
Huw
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.
Thanks,
Sruthi
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!
Thanks,
Johnson
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreAtlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.