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 2 Current »

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.

  • No labels