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