Just upgraded JIRA v.8.16.1 and ScriptRunner 6.37.0. I read that ComponentManager is deprecated and now I have to refactor this using by ComponentAccessor. But, I got "static type checking - the variable [issueManager] is undeclared." error. I am very unfamiliar with this language. Can you please help to convert it by using ComponentAccessor?
Below, I try to explain changes.
//BEFORE
//issueManager = ComponentManager.getInstance().getIssueManager();
//AFTER
issueManager = ComponentAccessor.getIssueManager();
void createSubtask(String issueType) {
..
//below line shows an error. static type checking - the variable [issueManager] is undeclared.
subTask = issueManager.createIssueObject(authenticationContext.getLoggedInUser(), issueObject);
}