JIRA custom field

notes for JIRA 7.1.6

some notes on creating a new custom field in JIRA and adding field limits to it,

    1. in JIRA login as administrator, go to JIRA Administration Config icon on top right > Issues

    2. on left list, scroll down to Fields > Custom Fields

    1. Add a custom field, click Screen to add it to JIRA screen

    2. To set max field char limit:

    3. Get a list of field IDs by going via API, https://<JIRA instance>/rest/api/2/field

    4. {"id":"customfield_10101","name":"SSH Tunnel Port #","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","SSH Tunnel Port #"],"schema":{"type":"string","custom":"com.atlassian.jira.plugin.system.customfieldtypes:textfield","customId":10101}}

    5. Click on Fields > Custom Fields > Edit, in the description, add a javascript to limit the field to 8 characters,

    6. <script type="text/javascript">

    7. document.getElementById("customfield_10101").maxLength=8;

    8. </script>

    1. Create a new issue, field should be visible and have a max value