Using JavaScript to Set Custom Field Values and HTML tags do not work in my OnDemand JIRA

Hi, Everybody

Have you ever met such behavior (JIRA OnDemand version) and know how to deal with it?

1. I set the JavaScript code from here following the guidelines on that page to a free text custom field. When I opened the issue form (screen), that custom field was just empty.


  • as specified in the guidelines, I inserted the code to Administration -> Issue Fields -> Custom Fields (not some other places, like in a Field Configuration schema);
  • changed the field ID to my field's ID;
  • one time I saw it working however cannot tell under which circumstances.

2. I also noticed, that all fields whose description contains tags <p> text </p> display with these tags in the issue forms when you work with issues too.

It seems it does not depend on the browser, I tried in Google Chrome and IE.

Thank you, Yuriy

1 answer

1 accepted

This seems to be the case with ondemand as opposed to hosted apps. I assume it's to prevent admins doing XSS attacks and the like.

You'd probably think that admins should be trusted, however perhaps someone temporarily got admin through a backdoor or was given it inadvertently, you wouldn''t want them to be able to put in a backdoor to let them get admin again. That's my guess anyway.

In short, none of the javascript "tricks" are possible using OnDemand.

Thank you, Jamie!

Also here is answer to this question from technical support:

Per our Restricted Functions in Atlassian OnDemand, due to some security vulnerability, we have changed the custom field's Description and the Introduction message (to display on the dashboard) field formation by only allowing plain text or wiki markup.


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

From Atlassian: Confluence Security Advisory - 2019-03-20

Atlassian released a security advisory on 3/20/2019.  The full advisory is here: In a nutshe...

22 views 0 1
View post

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