If you want to check if subtasks are resolved during resolving the main task you can add a transition condition to the active workflow
Script workflow function : Simple scripted condition : Checks script:
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.comments.CommentManager;
def subTaskManager = ComponentManager.getInstance().getSubTaskManager();
def result = true
CommentManager commentManager = ComponentManager.getInstance().getCommentManager();
Collection subTasks = issue.getSubTaskObjects()
if (subTaskManager.subTasksEnabled && !subTasks.empty) {
for(i in subTasks) {
commentManager.create (issue, "eyigitbasi", "2 " + i.issueTypeObject.id, false)
if(i.issueTypeObject.id.equals('11')) {
if(i.statusObject.id!=null && (i.statusObject.id.equals('5') || i.statusObject.id.equals('6'))){
result = true
} else {
return false
}
}
}
}
result