Originally asked by Patrick Mennecke on 08 March 2021 (original question)
How to send the ticket key of linked tickets in Jira?
Originally asked by Patrick Mennecke on 08 March 2021 (original question)
How to send the ticket key of linked tickets in Jira?
Answer by Francis Martens (Exalate) on 10 March 2021
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
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
Answer by Ariel Aguilar on 08 March 2021
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