Using JavaScript with custom fields

Just as in the Adding help tips to custom fields recipe, we can also add JavaScript code in the custom field description as long as we wrap the code in the <script> tags.

In this recipe, we will look at another way of removing the None option from select list custom fields.

Getting ready

This recipe uses the jQuery JavaScript library, which is bundled with JIRA. If you are not familiar with jQuery, you can find the documentation at http://jquery.com.

We will also need to use the custom field's ID in our script, so you will need to have that handy. You can find the ID by going to the Custom fields page, clicking on the Edit link of the target field, and clicking the number at the end of the URL, which is the field's ...

Get JIRA 7 Administration Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.