Populate a field based on another field's content in Jira server
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
in Jira 8.7 and later a setting was added with the default shifted to OFF as covered in:
To use the following article make sure to set the global setting to enabled as covered in the following documentation to use scripts in the field descriptions
Enable HTML in custom field descriptions and list item values:
Allows to add HTML to the descriptions of custom fields and the values of list items.
Default: OFF (recommended for security)
If you would like show a Field B, ONLY if certain value from Field A is chosen, it can be achieved by performing the following steps:
- Create a "Free Text Field (unlimited text)" custom field type in the (Administration -> Issue Fields -> Custom Fields) page
In this example, if a Priority - Critical (Field A) has been chosen for an issue, another field (Field B) will be displayed. Fill in the following text into the Description field (Field B):
Make sure to change the
priority.value. To find the
customfield_id, view the source of the page when viewing an issue, or check the URL when editing a custom field.