javascript inject in custom fields in jira 7

is it still possible to inject javascript in custom field descriptions like in JIRA 6?


This documentation is just for version 6.4 or lower:

3 answers

1 accepted

0 vote

Yes, you can.

could you please show how ?

put in the description like 6.4 does not get translate out to the final page code ...

It is the same way as in 6.4. Make sure your field description is updated in the correct field configuration. You can also check by changing the wordings on the description to test.

Also check your javascript to make sure it is correct.

I don't have an answer, I'm writing to find out why this isn't working for me in our internally hosted JIRA 7.3 instance.  I have successfully used JavaScript with custom fields in years past (like JIRA 5-6).  In this case, when I'm adding JS code to the description for a field in the configuration, all that's happening is that the code block is displaying beneath the field name.  This occurs whether I add the block by starting with <script type="text/javascript"> or if I use &lt;script type="text/javascript"&gt;

In either case, I just end up with the script block displaying in the Description area beneath the custom field in the chosen configuration, and no code gets executed.  Any ideas on what might be wrong?  I'd guess something in the system is set up to not render the code as code, but I'm not sure where such a thing might get configured.  Any ideas would be helpful.


Yes - Atlassian are removing the ability to execute arbitrary code such as javascript in descriptions, as they're a security (and sometimes, stability) risk.  It's not configurable.

Well...ok then!  :)

I get that they're a security issue, no argument there.  Is there another mechanism to accomplish the same effect?  In my specific case I want to show and hide fields based on the value selected from a custom select list.

Since posting my question I've gone into the system settings and I see that there's a value for "Enable HTML in custom field descriptions and list item values".  In our case it's off, so I was thinking this might be why I'm having my problem.  But it sounds from your response Nic as though this mechanism just doesn't work at all now.

Thanks for the update, I'll try to find another method to accomplish my goal.

That setting will enable html markup, but not scripting.

As far as I can tell, the only javascript you can inject now has to go into the announcement banner.  Or, you can use add-ons to get it in there.

Hello Nic,


We are upgrading Jira 6.3.9 to Jira 7.0.0, but after installation of Jira 7.0.0 there is no Javascript folder available under sources of chorme dubbugger.

As there is no JS folder, We unable to load our customised code of javascript, so we stuck there, and can't move forward.


Does Jira 7.0.0 support direct javascript ? OR we need some alternate way.




No, as I said earlier, it's being removed. 

You will have to bundle your javascript into an add-on and deploy it properly.

Hello Nic,


Thanks for your quick response.

Can you please suggest any suitable addon to load javascript for Jira 7.0.0


Best advice - don't.  It's hard to maintain, harder to get right and generally the wrong solution.

If you insist on doing it, then building your own add-on is the only real way to do it.

Hello Nic,


I have created custom plugin for Javascript but unable to load javascript.

We need to call that plugin using some event like onClick, onLoad which loads event for that page only, But we required javascript through out in my application.

So Custom plugin is not working.

Please suggest if you have any other solution.



eClerx Orion.

I'm afraid the fix is to get your javascript injected correctly.  Or better, stop using it, as it's probably the wrong solution to whatever you're trying to do with it.

0 vote
Steven Behnke Community Champion Jun 28, 2017

Scriptrunner includes a module called "Behaviors" which allows you to show/hide fields at will. Scriptrunner also lets you define arbitrary web resources, so you could load various JS files in certain contexts. This is only avaliable for JIRA Server.

If you use service desk, you can use Extension for Service Desk to show/hide fields on the Customer Portal.

Atlassian has disabled javascript in JIRA Cloud. It should still work in JIRA Server, but Atlassian has stated that they plan to remove it.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

424 views 2 4
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