JavaScript on Custom Field Description of JIRA 6.4

Custom JS existing on description of custom field is simply showing as description on screens. Existing functionality was broken on Create Issue screens. Is there any workaround?

2 answers

Remove JS from description and copy it as a JS file. Now call the custom JS file from announcement banner. it works.

Good approach. Exactly the same we did already since a few years and hence it - luckily - saved us during the update to JIRA 6.4.11 :-)

hi @srinivas

Looks like a promising solution. Can you please post an example of how I can call teh custom JS from announment banner?

I have the sample script here, which change sthe value of one custom field depending on other field's value. This once doesn't worked when the JS placed in Description.

"<script type="text/javascript">
appName = document.getElementById('customfield_14262');

target = document.getElementById('customfield_14261');

if (appName=="Bergen.Service) {
target.value = "bergen  service"




0 votes
Boris Berenberg Community Champion Apr 14, 2015

We disabled this on purpose: You can use a plugin to deliver custom JS if you need to. 

Looks like the website was down so I am not sure what it was on the mentioned page. Can we enable this again? One question: Cant we use JS on any existing JSP pages or on Announcement Banner?

Boris, I tried many times but the site is down. Could you please point any other page if that was available?

Boris Berenberg Community Champion Apr 16, 2015

The site is not down, I just tested it. I would suggest trying to access it from a different connection? Or maybe something is busted with your Atlassian ID account, try viewing it in an incognito window.

Hi Boris, I am able to access the site on different browser. Could you please provide some more details about plugin to deliver custom JS?

We have custom JS on some of description fields, actually copies reporter user field value to some custom fields. Could you please suggest any workaround to achieve this functionality?

Boris Berenberg Community Champion Apr 17, 2015

You would need to write a standard P2 (not connect) JIRA plugin to inject Javascript. I am not familiar with the exact how to for this as I am not a dev, but I know this is how we deliver custom JS on some of our instances. The only workaround I have is to do this via post functions where you can, and write a custom plugin to inject JS where you can't.

Post functions does not help us since we need to call the JS on page load of Issue Create.

Boris Berenberg Community Champion Apr 17, 2015

This is what you would use to load JS: Some Googling around says may also do this, but I don't know for sure. Would be important to trial and test first to see if it can help you inject the JS where you need.

Hi Boris, I got a simple work around. Now custom JS is also calling from announcement banner. I was not able to call JS on Create Issue dialog with the earlier versions from announcement banner but on JIRA 6.4 it is working. Thanks for sharing the links.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

136 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you