Remove the delete option for specific issue remote links

I would like to add remote links to my issues. I was able to do it with the following REST API

However, that link can be deleted manually from the issue’s page. Since I am using that link to offer a way to consult information about a specific object internal to my plugin (it redirects to a vm of my plugin that displays information about that object that is linked to the issue), I would like to remove the possibility to delete that link, or at least change the url of the delete action to redirect to a custom vm where I manage those links.

Is that possible?

Changing the deletion behaviour of remote links isn’t provided for by the add-on architecture. You could inject your own JavaScript into the page and mess with the HTML links, but that’s nasty and brittle.

Have you considered creating your own panel to present links that you manage within your add-on?

You could potentially listen to com.atlassian.jira.event.issue.link.RemoteIssueLinkDeleteEvent, and re-create the deleted links that you don’t want deleted. Not sure that’s a good user experience.

Alternatively, your add-on could check for the existence of particular links upon presentation of the Issue View page.

1 Like

@david.pinn how can I recreate the link. public void onRemoteIssueLinkDeleteEvent(RemoteIssueLinkDeleteEvent remoteIssueDelete)
remoteIssueDelete contains the globalId of the link and link id. If I search the remote link based on either of these 2 parameters, I don’t find any such link as the link is already deleted. How can I get the details like remote link url, jira issue id. I am using RemoteIssueLinkManager inside the event listner