Open one of project sidebar links in new tab by default

Dear Atlassian Community,

We added a new entry to a project sidebar using a plugin approach and we’d like this entry’s link to be opened in new tab when clicked.

Here’s the definition of this new entry from atlassian-plugin.xml:

<web-item key="similar-tickets-link" section="jira.project.sidebar.plugins.navigation" weight="700">
    <label>Find similar tickets</label>
    <param name="iconClass" value="aui-icon-large aui-iconfont-copy"/>
    <condition class="..." />

It probably requires some kind of parameter in web-item tag, or a new tag within it - if anyone has any ideas I’ll be much obliged for any input.

Due to project guidelines and restrictions, any use of JS injections is forbidden.

Clarify if you mean Jira CLOUD or Jira DATA CENTER.

For Data Center, you can probably just inject JavaScript to modify the link to have a target attribute.

For Cloud, Connect has it:

But it seems Forge doesn’t.

Due to project guidelines and restrictions, any use of JS injections is forbidden, but otherwise this definitely could work. Thanks for the input!

To be clear, by “injecting JavaScript” I mean the official way supported by Data Center plugin framework.

In atlassian-plugin.xml, add your JavaScript:

<atlassian-plugin key="${atlassian.plugin.key}" name="${}" plugins-version="2">

	<!-- Do not reuse name attributes here. All of them are considered a module in this plugin -->

        <vendor name="${}" url="${project.organization.url}" />
    <resource type="i18n" name="i18n" location="CustomFieldTypes"/>

	<!-- Web resources like CSS and JS -->
	<web-resource key="resources" name="Jira Resources">
		<!-- Since Jira 5.0, edit screen no longer supports $webResourceManager.requireResource. We need to put resources in specific context instead. -->
	 	<context>atl.general</context> <!-- General context -->
	 	<context>atl.admin</context> <!-- Admin context, i.e. custom field configuration pages -->
	 	<context>customerportal</context> <!-- Customer portal, i.e. service management pages -->
	 	<context>servicedesk.general</context> <!-- Service Desk general -->
    	<context>servicedesk.admin</context> <!-- Sercice Desk admin -->

    	<!-- This is your script to do the magic -->
    	<resource type="download" name="CustomFieldTypes.js" location="/js/CustomFieldTypes.js"/>


You need to specify all the contexts where you want your script to be available.

Then in your script, you try to find your specific link, and if found, add the target attribute to it.

function myMagicFunc() {
    // Setup MutationObserver to find target link and modify it