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??

 

1 answer

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?

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

Thanks  for your response.

 

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.

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

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??

If possible, can you share the script?

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

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

Can you try the below code block.

&lt;script&gt;
AJS.$("#customfield_10200 option[value='None']").remove();
&lt;/script&gt;

No, this is too not working.

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

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published 8 hours ago in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

277 views 4 4
Read article

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