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,
in JIRA login as administrator, go to JIRA Administration Config icon on top right > Issues
on left list, scroll down to Fields > Custom Fields
Add a custom field, click Screen to add it to JIRA screen
To set max field char limit:
Get a list of field IDs by going via API, https://<JIRA instance>/rest/api/2/field
{"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}}
Click on Fields > Custom Fields > Edit, in the description, add a javascript to limit the field to 8 characters,
<script type="text/javascript">
document.getElementById("customfield_10101").maxLength=8;
</script>
Create a new issue, field should be visible and have a max value