Hi,
I need to sum a customfield value on a list of subtasks which meet a criteria.
So for example, sum customfield_XXXX value from all subtasks of issue where sub task issue equals X.
I have this but it does not specify a sum of customfield in the subtask or filter by type:
if (issue.getIssueType().name != "Sub-task") { // only calculate this for non-subtask issues
def subTaskSum = 0
issue.getSubTaskObjects()?.each { subtask -> // go through all subTask issues
subTaskSum += 1
}
return subTaskSum
}