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.

Notes:

  • 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 widget could not be displayed.

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.

Yuriy

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 35m ago in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

8 views 0 0
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