Hi
I am use this scriptrunner to perform when a sub-task is going to "in progress", the issuetype story take the same workflow status.
But I have the following error:
"The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script625.groovy: 1: unable to resolve class com.atlassian.jira.ComponentManager @ line 1, column 1. import com.atlassian.jira.ComponentManager; ^ 1 error </pre>."
There is the code.
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.comments.CommentManager;
import com.opensymphony.workflow.WorkflowContext;
import org.apache.log4j.Category;
import com.atlassian.jira.config.SubTaskManager;
import com.atlassian.jira.workflow.WorkflowTransitionUtil;
import com.atlassian.jira.workflow.WorkflowTransitionUtilImpl;
import com.atlassian.jira.util.JiraUtils;
import com.atlassian.jira.issue.MutableIssue;
String currentUser = ((WorkflowContext) transientVars.get("context")).getCaller();
WorkflowTransitionUtil workflowTransitionUtil = (WorkflowTransitionUtil) JiraUtils.loadComponent(WorkflowTransitionUtilImpl.class);
MutableIssue parent = issue.getParentObject() as MutableIssue
String originalParentStatus = parent.getStatus().getSimpleStatus().getName()
def isToDoStatus = originalParentStatus in ['To Do']
if (isToDoStatus) {
workflowTransitionUtil.setIssue(parent)
workflowTransitionUtil.setUserkey(currentUser)
workflowTransitionUtil.setAction(31)
if (workflowTransitionUtil.validate()) {
workflowTransitionUtil.progress()
}
}
Can anyone help me?