Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ScriptRunner for JIRA
import com.atlassian.jira.component.ComponentAccessor
def doTransition(issue, int actionId, user){
def issueService = ComponentAccessor.getIssueService()
def issueInputParameters = issueService.newIssueInputParameters();
def transitionValidationResult = issueService.validateTransition(user, issue.id, actionId, issueInputParameters);
if (transitionValidationResult.isValid()){
issueService.transition(user, transitionValidationResult);
return true
} else {
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment