While adding Java script to my custom field's Description it is not working. I want to align the custom field. What should i do??

Amrusha Nekkanti July 26, 2016
 

1 answer

0 votes
Bharadwaj Jannu
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.
July 26, 2016

Align in the sense do you want to re order your customfield? How do you add? Do you add the script in the customfield in the field configuration or directly in the customfield description?

Amrusha Nekkanti July 26, 2016

Yes, i want to re order the custom field and yes, iam adding the JSS directly to the description field.

Thanks  for your response.

 

Bharadwaj Jannu
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.
July 26, 2016

why don't you add the javascript in the customfield of your project field configuration it worked for me when I add in the field configuration. Also you can change the order of the customfield directly in the screen but it will be global to all projects using this screen.

Amrusha Nekkanti July 26, 2016

Ok, sure then i'll try it thanks......

Amrusha Nekkanti July 26, 2016

Actually when iam adding the script to the description field its being automatically updated in the field configuration. But for confirmation i have added once more and its not working, is anything going wrong??

Bharadwaj Jannu
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.
July 26, 2016

If possible, can you share the script?

Amrusha Nekkanti July 26, 2016

This is the script for removing the "none" option in the field

<script>
AJS.$('#customfield_10200 option[value="-1"]').remove();
</script>

Bharadwaj Jannu
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.
July 26, 2016

Can you try the below code block.

&lt;script&gt;
AJS.$("#customfield_10200 option[value='None']").remove();
&lt;/script&gt;
Amrusha Nekkanti July 26, 2016

No, this is too not working.

Bharadwaj Jannu
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.
July 26, 2016

Can you add your script in the comment field in the field configuration.

Suggest an answer

Log in or Sign up to answer