Created
January 8, 2014 21:17
-
-
Save jechlin/8324824 to your computer and use it in GitHub Desktop.
repoen subtasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.atlassian.jira.issue.Issue | |
import com.atlassian.jira.issue.MutableIssue | |
import com.onresolve.jira.groovy.canned.utils.WorkflowUtils | |
def issue = issue as Issue | |
// ---------------- CONFIGURE THIS -------------------------- | |
def actionId = 3 // action ID to reopen a subtask | |
// ---------------------------------------------------------- | |
def user = WorkflowUtils.getUser([transientVars: transientVars]) | |
if (issue.isSubTask()) { | |
log.warn("This function should not be applied to subtask workflows") | |
} | |
else { | |
issue.subTaskObjects.each {subtask -> | |
if (WorkflowUtils.hasAction(subtask, actionId)) { | |
WorkflowUtils.actionIssue(null, subtask as MutableIssue, actionId, user, [:]) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment