I have two tickets I use for testing my code below. One (ITSD-94) is an epic with 2 story links. The other (ITSD-1062) is an epic with a "Child-Parent" link, which is a custom link we created.
With getLinkCollectionOverrideSecurity().getAllIssues(), I get no issues from ITSD-94, but do get the one issue under ITSD-1062.
Why?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
import com.atlassian.jira.issue.link.IssueLinkTypeManager
def issueManager = ComponentAccessor.getIssueManager()
def issue = issueManager.getIssueObject('ITSD-94')
//def issue = issueManager.getIssueObject('ITSD-1062')
def issueLinkList = issueLinkManager.getLinkCollectionOverrideSecurity(issue).getAllIssues()
for (def issueLink: issueLinkList) {
log.error 'issue link2: ' + issueLink//.getKey()
}
Hi @Paul Tiseo
The issue link manager will return items that have been created by issue linking.
the relationship between stories and the epic you set on them is not an issue link
you will need to write code to access epic stories specifically
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.