Hi Team,
Recently we have upgraded Jira server instance to version 9.4.1 and we have upgraded Adaptive script runner version 6.55.0.
before the upgrade all the workflow post functions are working fine. but post upgrade Jira and plugin, all the scripts are not working for auto transition parent when sub-task is transitioned. but in logs we could not find any errors. the script is working fine. Kindly find the below mentioned script and pls let us know if any thing needs to change in the script.
import com.atlassian.jira.component.ComponentAccessor;
import com.opensymphony.workflow.WorkflowContext;
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);
def workflowTransitionUtil = ComponentAccessor.getComponent(WorkflowTransitionUtilImpl.class)
MutableIssue parent = issue.getParentObject() as MutableIssue;
String originalParentStatus = parent?.status?.name
if (issue.issueType.name == "Sub-Task" && originalParentStatus == 'IN PROGRESS' ) {
workflowTransitionUtil.setIssue(parent)
workflowTransitionUtil.setUserkey(currentUser)
workflowTransitionUtil.setAction(21)
workflowTransitionUtil.validate()
workflowTransitionUtil.progress()
}
Thanks .
Hi @skala
It would be helpful if you could look at the server log and look for the error that occurs when you perform the operation.
With an update it is possible that some method has been deprecated.
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.