Find my custom field ID number in Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

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.
(info) This option does not require Jira Admin rights.

  1. Access an issue that has the custom field you want to find the ID for.
  2. Make sure that the field is filled, so that it shows on the issue view.
  3. Right-click on the field name and select "Inspect."
  4. 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

    a screenshot of a browser window. The left side shows Jira's issue view with a custom field highlighted. The right side shows developer tools including the custom field's ID value.

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.
(info) This option does not require Jira Admin rights.

  1. Create a simple JQL to return an issue that includes the field you want.
  2. After running this query, switch to the "List View."
  3. Add the field you want as a column in the results.
  4. Click on the name of the field in the column to order the results by this custom field.
  5. Now switch the JQL type to Advanced if not already.
  6. The ID of the field will be listed in the ORDER BY clause.
    Screenshot of issue search which includes an order by JQL clause. This clause includes the field ID number.

Use Jira Home Directory and DB Browser plugin

This step is only available in our Server and Data Center products.

  1. To run the following steps, make sure you have the JIRA Administrator's permission.
  2. Install Jira Home Directory And DB Browser.  
  3. Navigate to the Db Console.

  4. 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.

  1. Navigate to Settings () > Issues > Custom fields under the Fields section.
  2. Click on the More () icon to the right of the custom field you want the ID for.
  3. Select the View field information option.
  4. 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.

  1. Open the issue that you want to get the custom field ID for
  2. Click the Actions () icon towards the top right corner
  3. Select the Export to XML option, which will open up a new tab with the issue details in XML format
  4. 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=#
Last modified on Nov 7, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.