Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Send linked ticket ID

 
1
0
-1

How to send the ticket key of linked tickets in Jira?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Patrick Mennecke

      In addition to Ariels response, I reckon that you want to send the keys of the tickets which are linked to the issue under sync.



      To iterate over all the linked tickets

      • Setup an issue with a number of links


      • Now you can write following snippet to iterate over all the links

        import com.atlassian.jira.component.ComponentAccessor
        
        String result = ""
        String sep=""
        
        
        issue.issueLinks.each { 
            result += sep + it.linkTypeName + " - " + ComponentAccessor.issueManager.getIssue(it.otherIssueId)?.key
            sep= ", "
            
        }
        
        debug.error("links = ${result}")


      This results in

      links = Blocks - AN-421, Cloners - AN-420





      Notes

      • More information on issueLinks is here
      • ComponentAccessor.issueManager.getIssue dereferences the otherIssueId
        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Patrick,


        We have documentation on how to do it using a custom field. Please take a look at this: https://docs.idalko.com/exalate/x/XQR1Aw


        Let me know if this works for you.


        Kind regards,

        Ariel

          CommentAdd your comment...