Example scripts
To homepage
Jira

Close an Epic when all the Issues Under that Epic are Closed
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira (8.0 - 8.19)

ScriptRunner For Jira (7.10.0)
Language |
groovy
def epicIssue = issue.epic
if (!epicIssue) {
return
}
// Find all unresolved stories
def openStories = epicIssue.stories.findAll { !it.resolution }
// If there are still open stories (except the one in transition) - then do nothing
if (openStories.size() > 1) {
return
}
epicIssue.transition('Done') {
setComment('This Epic closed automatically because all the issues in this Epic are closed.')
}
Having an issue with this script?
Report it here