Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get issue key from LinkCreated Event from Script Listener

kponnus1 August 21, 2024 edited

 

1. When any link is created using linkCreated event is it possible to get exact issue key from where the link is created?.

i can use below code to determine source and destination issue id

 

def linkId = issueLink.entrySet().getAt(0).value
def sourceIssueID =issueLink.entrySet().getAt(1).value
def destIssueID =issueLink.entrySet().getAt(2).value
However this source and destination id got changed when issue link type is changes from inward to outward when a link is created 
2.The get issue link API also doesn't support direction to finalize from which issue the link is created like below in jira expression.
See issueLink -> direction

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Stefan Salzl
Community Champion
January 17, 2025

Hi @kponnus1 

I kinda have a hard time understanding your requirement.

Of course the the source/destination issue changes if you change the inward/outward direction. To do this you would have to again set a new link (just in the reverse direction) which again would trigger a linkCreatedEvent.

An event is a specific point in time. If you want to write the events source/direction file out of the event it´s correct at that time.

Best
Stefan

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events