Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Getting Issue Links Reliably Via Server API

Edited

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()
}

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 17, 2018

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 

TAGS
AUG Leaders

Atlassian Community Events