I am executing the following code in my scriptrunner console for Jira data center.
Here is the code:
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
def issueManager = ComponentAccessor.issueManager
def issueFactory = ComponentAccessor.issueFactory
def issueLinkManager = ComponentAccessor.issueLinkManager
def userManager = ComponentAccessor.userManager
def authenticationContext = ComponentAccessor.jiraAuthenticationContext
MutableIssue newIssue= ComponentAccessor.issueFactory.issue
log.warn(authenticationContext.getLoggedInUser())
issueLinkManager.createIssueLink(1521112 as long , 1782819 as long, 10070 as long, 1 as long, authenticationContext.getLoggedInUser())
issueLinkManager.createIssueLink(1521112 as long , 1782819 as long, 10070 as long, 1 as long, authenticationContext.getLoggedInUser())
although none of the parameters is null. The error message is not telling me what the problem is. Anyone knows what to do in order to fix this problem? I am just trying to have a new feature issue linked to the superfeature main issue.
I'd guess that one of the given objects (either one of the issues or the link itself) doesn't exist.
You can try to cross-check this while loading the corresponding objects with your given IDs, for example
issueManager.getIssueObject(1521112)
issueManager.getIssueObject(1782819)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.