Skip to end of banner
Go to start of banner

Sum up story points for issues in an Epic

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

We've encountered an issue exporting this macro. Please try exporting this page again later.

Problem

You want to have a fields that contains the sum of all the story points under an Epic.

Solution

integer sum = 0;
if(issueType == "Epic") {
    for(string i in selectIssues("parent = " + key)) {
        if(i.storyPoints > 0) {
            sum += i.storyPoints;
        }
    }
}
return sum;

Example output: 7

Make sure that the “Parent update” trigger is enabled in the scripted field configuration to ensure that the scripted field on the Epic gets updated when a Story (or other child issue type) is updated.

Also, make sure that the issue types of the child issues is added to the configuration so that scripted fields will be triggered when those children are updated.

  • No labels