Find my custom field ID number in Jira
Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
There are multiple methods to obtain custom field IDs for Jira and Jira Service Management products.
Having the custom field ID can be useful when working with API payloads or running SQL queries (Server or Data Center), which require the ID instead of the field name.
Inspect the custom field in the Issue View page
Using Chrome or Firefox, we can utilize the Developer Tools panel in order to quickly identify the ID of a custom field that's present on an issue page.
This option does not require Jira Admin rights.
- Access an issue that has the custom field you want to find the ID for.
- Make sure that the field is filled, so that it shows on the issue view.
- Right-click on the field name and select "Inspect."
On the Developer Tools panel, you should see the name and ID for your custom field at the end of the thread. Example:
issue-field-heading-styled-field-heading.customfield_XXXXXX
Search with Advanced JQL view
Using a combination of the List View and advanced JQL, we can identify the ID of a custom field that's listed on the results.
This option does not require Jira Admin rights.
- Create a simple JQL to return an issue that includes the field you want.
- After running this query, switch to the "List View."
- Add the field you want as a column in the results.
- Click on the name of the field in the column to order the results by this custom field.
- Now switch the JQL type to Advanced if not already.
- The ID of the field will be listed in the ORDER BY clause.
Use Jira Home Directory and DB Browser plugin
This step is only available in our Server and Data Center products.
- To run the following steps, make sure you have the JIRA Administrator's permission.
- Install Jira Home Directory And DB Browser.
Navigate to the Db Console.
Select the
customfield
table and Execute.
Check the URL in the custom fields list
Please note, that the "Administer Jira" Global permission is necessary to complete these steps.
- Navigate to Settings () > Issues > Custom fields under the Fields section.
- Click on the More (⋯) icon to the right of the custom field you want the ID for.
- Select the View field information option.
- Observe the URL in your browser, which will contain the ID of the field:
https://<your_jira_site>/secure/admin/ConfigureCustomField!default.jspa?customFieldId=10026
In the above example, the custom field ID is 10026.
Use Jira REST API
The "Get Fields" endpoint
The Get Fields Jira Cloud API endpoint returns custom fields in a list. Please see the Cloud REST API documentation or the JIRA Server REST API references 8.13.9/8.18.1 and earlier or 8.13.10/8.18.2 and later for additional examples and rules relating to using this endpoint. The returned JSON data will need to be filtered to identify the field you are looking for and its ID.
The URL which you can paste on your browser and replace the <JIRA_BASE_URL> is:
<JIRA_BASE_URL>/rest/api/latest/field
Sample response from the API:
{
"id": "customfield_10026",
"key": "customfield_10026",
"name": "Approvals",
"untranslatedName": "Approvals",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"Approvals",
"Approvals[Approvals]",
"cf[10026]"
],
"schema": {
"type": "sd-approvals",
"custom": "com.atlassian.servicedesk.approvals-plugin:sd-approvals",
"customId": 10026
}
}
The "Get Issue" endpoint
Using the Get Issue REST API endpoint to fetch details for a specific issue, you can add the ?expand=names parameter so it lists all custom field names that are in scope for it. For example, using issue BS-1:
<JIRA_BASE_URL>/rest/api/latest/issue/BS-1?expand=names
In the last section of the output you can search for the field and take note of the ID in front of "customfield_XXXXX" (here you can see Sprint custom field has ID 10105 and Story Points is 10106):
names: {
...
customfield_10105: "Sprint",
customfield_10106: "Story Points",
...
}
Export to XML
The custom field IDs used by issues can be retrieved by exporting the issue to XML within the Jira and Jira Service Management user interface. This method will show field IDs for fields present on the issue only.
- Open the issue that you want to get the custom field ID for
- Click the Actions (⋯) icon towards the top right corner
- Select the Export to XML option, which will open up a new tab with the issue details in XML format
- Search for the field name to identify its custom field ID
<customfield id="customfield_10026" key="com.atlassian.servicedesk.approvals-plugin:sd-approvals">
<customfieldname>Approvals</customfieldname>
<customfieldvalues> </customfieldvalues>
</customfield>
In the above example, the custom field ID is 10026 for the Approvals field.
From Database
Please note, the Jira database can only be accessed directly while using Jira Server or Data Center products.
Using the below DB query:
jiradb=# select id from customfield where cfname='Approvals' ;
id
-------
10026
(1 row)
jiradb=#