We are using Story points on Sub-tasks. I have been trying to sum up all the story points on sub-tasks to their corresponding Story parent in a Scriptrunner scripted field. It's probably something really simple. I am not picking up the story points, it is only returning 0,
import com.atlassian.jira.issue.Issue
def subTasks = issue.getSubTaskObjects()
def intStoryPoints = 0
subTasks.each {
if(getCustomFieldValue("Story Points") != null)
intStoryPoints += getCustomFieldValue("Story Points")
}
return intStoryPoints