I need to link two sub tasks.
I've read some posts where such question was discussed:
https://community.atlassian.com/t5/Jira-questions/Script-Runner-Post-function-to-link-back-to-issue/qaq-p/41966
http://www.denizoguz.com/2013/06/29/jiraautomatically-linking-issues-with-a-script-during-create-transition/
from the code provided there I am stuck at this part:
import com.atlassian.jira.ComponentManager;
def issueLinkTypeManager = componentManager.getComponentInstanceOfType(IssueLinkTypeManager.class);
I get
No such property: IssueLinkTypeManager for class
groovy.lang.MissingPropertyException: No such property: IssueLinkTypeManager for class
As is written at atlassian jira/docs/api/6.2.4
<b><a href="https://docs.atlassian.com/software/jira/docs/api/6.2.4/com/atlassian/jira/ComponentManager.html#getComponentInstanceOfType(java.lang.Class)" target="_blank" rel="nofollow noopener noreferrer">getComponentInstanceOfType</a></b>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" target="_blank" rel="nofollow noopener noreferrer">Class</a><T> clazz)
Deprecated. since 6.0 - please use the jira-api ComponentAccessor.getComponent(Class) instead
So I've tried to use Component accessor:
import com.atlassian.jira.component.ComponentAccessor;
ComponentAccessor.getComponent(IssueLinkTypeManager.class)
But I get the same error about IssueLinkTypeManager.