Forums

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

Open link in a new tab using Raw XML Module or Custom web item scriptrunner

TQA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 8, 2019

I'm using scriptrunner and I'm trying to create a link in system top bar navigation with Custom web item and with Raw XML Module. In both cases the link works well but in the same tab of the browser. I'd like to open link in a new tab or in a new window. The target attribute in link tag is not supported.

<web-item key='link-to-google' name='ScriptRunner generated web item - link-to-google' section='system.top.navigation.bar' weight='50'>
  <label>Link Google</label>
  <link linkId='link-to-google'>http://www.google.com</link>
</web-item>

If I use this doesn't work

<a href="https://www.google.com" target="_blank">Google</a>

Is there an alternative for this? Or is better I use other tools to do this?

1 answer

1 accepted

0 votes
Answer accepted
Anton Chemlev - Toolstrek -
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2019 edited

Hi,

It seems it is not possible with Web Item. But you can do some hacky things with JS, like this - https://confluence.atlassian.com/confkb/how-to-force-links-to-open-in-a-new-window-213518072.html?_ga=2.67966097.1650090061.1564855566-799061718.1554741897

Search the community, there are some different solutions with JS.

 

TQA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 9, 2019

Hi, thanks for your answer but I'm using Jira Server version 7.11 (in the next weeks I will update to Jira 8).

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events