Skip to content

Instantly share code, notes, and snippets.

@vikrantyadav11
Created April 27, 2021 05:24
Show Gist options
  • Save vikrantyadav11/3847431dc4b9d75f04e71824607c7d5c to your computer and use it in GitHub Desktop.
Save vikrantyadav11/3847431dc4b9d75f04e71824607c7d5c to your computer and use it in GitHub Desktop.
Scripted Field to get number of sub-task created under parent issue
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment