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

Yuriy Belodray August 13, 2012

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

1 vote
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2012

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.

Yuriy Belodray August 13, 2012

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
TAGS
AUG Leaders

Atlassian Community Events