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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

issueLinkManager.getOutwardLinks do not find all links

Hi, 

 

We have scriptrunner for Jira in use and I have script which should check all linked issues to Initiatives. 

Currently I use for logging : 

issueLinkManager.getOutwardLinks(issue.id).each { issueLink ->;
Issue linkedIssue = issueLink.destinationObject

log.info( "****************getOutwardLinks************** ! ")
log.info( "**** linkedIssue : " +linkedIssue)
log.info( "**** issueLink.issueLinkType.name : " +issueLink.issueLinkType?.name)
log.info( "**** linkedIssue.resolution.name : " +linkedIssue.resolution?.name)
log.info( "****************************** ! ")

if (issueLink.issueLinkType?.name == "Parent-Child Link") {......

 

by some reason this does not find links for all issues. 

New initiative + new linked epic this works ok

Old initiative + new linked epic founds new linked epic not old ones in same initiative. 

Old initiative + old linked epic not work.

 

 

2 answers

I'm not sure that's the case, but are you sure you are using the right way links? Each issue link has a source and destination (from which and to what issue it goes), so by getting only issue's outward links you are getting only those ones where you issue is the source.

So maybe links you are missing are inward ones? It sometimes get's messy when you name both directions similar.

Hi, 

 

Can initiative - epic link be build in wrong way as it is parent - child type, similar like epic- task ? 

I guess if it's "issue in epic" type of link then probably no, if it's regular link then yes.

In this case issue in epic and parent linking for initiatives, so structural linking in this case. 

In case of regular (relates, blocked by .. ) linking is different story. 

hello,

i have the same kind of problem in a scriptunner script i'm testing in the console:

An initiative (transverse purpose Initiative for maintenance activities) has 326 child Epics:

- i can list the 326 Epics in the Child issues section of the Initiative ticket

- i can list the 326 Epics using the JQL query "Parent Link" = key of my Initiative ticket

- But i get only 181 Epics (all as outward links)  when listing them using the following scriptunner groovy script in the console:

issueLinkManager.getOutwardLinks(issue.id).each { IssueLink linkedInitiativeChildIssue ->
log.info("OUTLINK FOUND: "+linkedInitiativeChildIssue.getDestinationObject().getKey()+" ISSUE TYPE: "+linkedInitiativeChildIssue.getDestinationObject().getIssueType().getName())
}

issueLinkManager.getInwardLinks(issue.id).each { IssueLink linkedInInitiativeChildIssue ->
log.info("INLINK FOUND: "+linkedInInitiativeChildIssue.getSourceObject().getKey()+" ISSUE TYPE: "+linkedInInitiativeChildIssue.getSourceObject().getIssueType().getName())
}

 

Furthermore:

After identification of a missing Epic, if i display the missing Epic ticket, then edit the field "Parent Link" and validates it without changing its vakue, then this Epic will appear if i execute again the groovy script !

 

Would anyone has an idea of the cause of this, and how to remedy ?

 

Thanks a lot :)

Laurent

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you