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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

RemoteIssueLinkCreateEvent doesn't have id when custom jira listener catches it


Hi Community,

Could you please help with issue below? Did you face this problem?

Now we are implementing custom listener for our system, listener must catch moments when user create/delete remote issue links on local server and noticed that object of RemoteIssueLinkCreateEvent doesn't have id when listener catches it. We suppose this is a bug, but we didn't find bug ticket for this.

Also we noticed that jira has another such event RemoteIssueLinkUICreateEvent and it's working well, because RemoteIssueLinkCreateEvent has id and we can work with this. But we cannot use it because it works just in case user creates remote link by jira UI, so such way cannot catch moment when user creates remote links by rest api http://localhost:8080/rest/api/latest/issue/TEST-1018/remotelink .

We use JIRA server with version: 8.2.1

Below you can find an example how we test of catching such events:

public class RemoteIssueLinksListener extends AbstractIssueEventListener

private final RemoteIssueLinkManager remoteIssueLinkManager;

public RemoteIssueLinksListener(RemoteIssueLinkManager remoteIssueLinkManager, JiraAuthenticationContext jiraAuthenticationContext)
this.remoteIssueLinkManager = remoteIssueLinkManager;
this.jiraAuthenticationContext = jiraAuthenticationContext;

public void onCreateRemoteIssueLinkEvent(RemoteIssueLinkCreateEvent remoteIssueLinkCreateEvent)
LOG.error("Create - TEST");
LOG.error("Create -: "+ remoteIssueLinkCreateEvent.getRemoteIssueLinkId());
LOG.error("Create -: "+ remoteIssueLinkCreateEvent.getGlobalId());

LOG.error("TEST: "+ (remoteIssueLinkManager == null));
Long id = remoteIssueLinkCreateEvent.getRemoteIssueLinkId();
LOG.error("id: "+ id);

RemoteIssueLink remoteIssueLink = remoteIssueLinkManager.getRemoteIssueLink(id);
LOG.error("Link: "+ (remoteIssueLink == null));

public void onCreateUiRemoteIssueLinkEvent(RemoteIssueLinkUICreateEvent remoteIssueLinkUiCreateEvent) {
LOG.error("Create UI - TEST");
LOG.error("Create UI -: "+ remoteIssueLinkUiCreateEvent.getRemoteIssueLinkId());
LOG.error("Create UI-: "+ remoteIssueLinkUiCreateEvent.getGlobalId());

LOG.error("TEST: UI"+ (remoteIssueLinkManager == null));
Long id = remoteIssueLinkUiCreateEvent.getRemoteIssueLinkId();
LOG.error("id: "+ id);

RemoteIssueLink remoteIssueLink = remoteIssueLinkManager.getRemoteIssueLink(id);
LOG.error("Link: "+ (remoteIssueLink == null));


4 answers


is there a "workaround" for web links also?

I understand Atlassian is not willing to fix However, I would have to implement a listener that fires when an external web link is added to an issue. So I thought the "RemoteIssueLinkCreateEvent" would be the way to go - however, all the properties are empty/null:

[c.o.scriptrunner.runner.ScriptBindingsManager] < applicationType=null remoteIssueLinkId=null globalId=null>

I'm kind of stuck here... :-(


PS: sorry, obviously this is not an answer but I didn't want to start another topic for the same problem.

@Vladimir Kibe , Hi, we thought about the solution you have suggested, but we investigated this issue and got root cause of issue is a bug in DefaultRemoteIssueLinkManager in Jira sources (8,2.1) in function createRemoteIssueLink. 

.publish(new RemoteIssueLinkCreateEvent(remoteIssueLink)) 

 "remoteIssueLink" is temporary object that used for creating remote link in DB of Jira and it also doesn't contain id of remote link.

We got from Atlassian Support answer, that they don't support support such developing request from clients, so we was forced to fix bug ourself. Below you can find we fixed this issue in soruces

.publish(new RemoteIssueLinkCreateEvent(created));

 "created" is object that was generated after creating new remote link in jira db.

Also if you like this fix and you have access to jira sources, you can find below article from Atlassian How to compile jira sources

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager

if(event instanceof RemoteIssueLinkCreateEvent) {
RemoteIssueLinkManager rm = ComponentAccessor.getComponent(RemoteIssueLinkManager.class)
IssueManager im = ComponentAccessor.getIssueManager()

RemoteIssueLinkCreateEvent event = (RemoteIssueLinkCreateEvent) event

List<RemoteIssueLink> links = rm.findRemoteIssueLinksByGlobalIds([event.globalId])

for (RemoteIssueLink link : links) {
Issue issue = im.getIssueObject(557230)

Like that you get issue object

i'm too looking solve this problem....

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events