Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript shows below custom field

Vimalraj
Contributor
December 28, 2020

Hi,

We recently upgraded Jira version to 8.12. Since then, I'm getting below Javascript under one of the custom fields. Could you please assist why see it and how to remove it?

<script type="text/javascript">
var removeCTE = setInterval(function() {
var editableElms = AJS.$('#customfield_10119-val')
if (editableElms.length) {
editableElms.removeClass('inactive');
editableElms.removeClass('editable-field');
editableElms.removeAttr('title');
editableElms.find('span.overlay-icon').hide();
}},200);
</script>

Thanks,

 

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
December 28, 2020

One of the improvements in later versions of Jira is that they no longer render botches like javascript in field descriptions.

To get rid of the text, edit the field description and remove the script.

0 votes
Daniel Ebers
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.
December 28, 2020

Hi Vimalraj,

in case you want to remove it (therefore it must be ensured it does not server any purpose anymore) you can remove it by editing the custom field and/or the field configuration.

In case you still need it you would need to adjust the setting again so the code will interpreted again. From a security aspect it would be better to get rid of it.

Let us hear from you if you need details or if you are just going to delete the script.

Regards,
Daniel

Vimalraj
Contributor
December 28, 2020

Thanks @Daniel Ebers It was added in field configuration. I have removed it. 

Suggest an answer

Log in or Sign up to answer