Hi Team,
I have a requirement "Add Sub-Task Count (Numeric) field to be auto-updated based on related sub-tasks (child) with a Status != Closed. "
I have tried with below code as per our old community tickets. Its working , but i would like to get only open tickets count, not all tickets count. Any suggestion how to add the jql in this script?
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