All Subtasks Resolved

All QA Sub-tasks resolved

This condition verifies that all subtasks of a certain issue type, in this case QA, must be resolved in order for the transition to be allowed.

There is a built-in script All subtasks resolved, but if we want to tweak it such that we only care about certain subtask types, or components, or assignees or whatever, we need to write it ourselves. Which is pretty easy.

passesCondition = true
def subTasks = issue.getSubTaskObjects()

subTasks.each {
    if (it.issueType.name == "QA" && !it.resolution) {
        passesCondition = false
    }
}

All Sub-tasks assigned to me

Similarly, a condition to check that all subtasks are assigned to the current user:

import com.opensymphony.workflow.WorkflowContext

def subTasks = issue.getSubTaskObjects()

String currentUser = ((WorkflowContext) transientVars.get("context")).getCaller()
passesCondition = subTasks.every { it.assigneeId == currentUser }

On this page