Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

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
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

130 views 1 2
Read article

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