Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto transition parent when sub-task is IN progress script is failing after upgrade of Jira to 9.4.1

skala February 13, 2023

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 .

1 answer

0 votes
David A
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2023

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

Suggest an answer

Log in or Sign up to answer