Created
May 22, 2016 18:03
-
-
Save jechlin/07ab16f9390eee02b34fa4c74eec5c92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.issue.link.IssueLinkManager | |
def issueManager = ComponentAccessor.getIssueManager() | |
def issueLinkManager = ComponentAccessor.getComponent(IssueLinkManager) | |
log.debug("is subtask: ${issue.isSubTask()}") | |
if (issue.isSubTask()) { | |
log.debug("issue id: ${issue.id}") | |
log.debug("parent: ${issue.parentObject}") | |
log.debug("sibs: ${issue.parentObject.subTaskObjects*.key}") | |
issueLinkManager.createIssueLink(issue.id, issueManager.getIssueObject("SRTESTPRJ-14").id, 10000L, 0, ComponentAccessor.jiraAuthenticationContext.loggedInUser) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment