Retrieving custom field details from a database
In the previous recipe, we have seen how to retrieve the standard fields of an issue from the database. In this recipe, we will see how to retrieve the custom field details of an issue.
All the custom fields in JIRA are stored in the customfield
table, as we have seen while modifying the custom field types. Some of these custom fields, such as, select fields, multi-select fields, and so on, can have different options configured and they can be found in the customfieldoption
table.
For each custom field, there can be a set of contexts configured. These contexts specify the projects or a list of issue types the field is associated with. For each such context, an entry is made in the fieldconfigscheme
with a unique ID. For each fieldconfigscheme
, there will be entries in the configurationcontext
and fieldconfigschemeissuetype
tables, configurationcontext
holding the projects the field is associated with in the relevant context, and fieldconfigschemeissuetype...