Forums

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

Live link to Confluence from a JIRA Field or button

Martin LALONDE
Contributor
August 22, 2018

Hello,

I have found something that seem that would answer my question here but when I have tried to replicate it wouldn't work.

Is it still possible to render a field description and inject HTML or Javascript?

Custom field Javascript.pngResult of custom field, I see the text under as a description but it ain't clickable.Result Javascript.pngI would like to use this solution that when it is click it open a new Confluence document in the proper space and then be link to the Jira task.

Current version JIRA v7.6.1

Thanks in advance,

2 answers

1 accepted

0 votes
Answer accepted
Nir Haimov
Community Champion
August 23, 2018

Hi,

It works, i think you just need to to put all your code (in the description) inside "script" tag, like:

<script>
//your JS code goes here
</script>
0 votes
Martin LALONDE
Contributor
August 23, 2018

Thanks for your help but this doesn't work.

I've looked for js scripts in the forum and found this post 

https://community.atlassian.com/t5/Jira-questions/Javascript-files-are-not-loading-on-the-Pop-screen-of-Jira-5-1/qaq-p/309523

I've updated my script in the description

&lt;script type="text/javascript"&gt;
AJS.$(document).ready(function() {
&lt;/script&gt;&lt;a target="_blank" href="http://confluence...."&gt;CLICK ME!&lt;/a&gt;
});
&lt;/script&gt;

I do see the text under description but it not clickable..

I've also looked at the link posted in that one talking about Custom Fields that use CSS or JavaScript Web Resources in JIRA 5.0 but I got lost.

I'm not sure what to check... thanks

Nir Haimov
Community Champion
August 24, 2018

What is your Jira version?

You are using server right? not cloud...

Suggest an answer

Log in or Sign up to answer