Finding the ID for Issue Types

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center 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

Problem

When configuring a mail handler to create issues from email, it is often useful to know the IDs of issue types.

Environment

Jira Server/Data Center, any version from 7.0.0. For Jira Cloud please go here.

Solution

Using Jira browser user interface:

Here is a Jira Administrator can find the ID of an issue type:

You will need to be a Jira Administrator in order to perform these steps. If you do not have Jira Administration privileges, you may contact your Jira Administrator for assistance.

  1. Navigate to the Administration > Issues > Issue Types page.
  2. On that page, hover your mouse cursor over the Edit operation link of an issue type.
  3. Jira will display the issue type's ID appended to the URL shown in the browser's status bar. For example, the "id" in this link represents the id of the issue type: 

    http://<your-jira-server>/secure/admin/EditIssueType!default.jspa?id=<ISSUE_TYPE_ID>

Here is how a Project Administrator can find the ID of an issue type:

You will need to be a Project Administrator in order to perform these steps. If you do not have Project Administration privileges for the project, you may contact one of the Project's Administrators for assistance.

  1. Navigate to Project Settings > Issue Types
  2. On that page, hover your mouse cursor over the Issue Type in the left menu
  3. Jira will display the issue type's ID appended to the URL shown in the browser's status bar:

    http://<your-jira-server>/plugins/servlet/project-config/<PROJECT_KEY>/issuetypes/<ISSUE_TYPE_ID>

Using Jira REST API:

You will need to be a Jira Administrator (or Project Administrator) in order to perform these steps.

Access http://<your-jira-server>/rest/api/2/project/{projectIdOrKey} URL in browser or using your REST client (the examples below uses cURL and jq to parse returned JSON data):

curl -s -u {username}:{password} \
	-X GET \
	-H 'Accept: application/json' \ 
	'http://<your-jira-server>/rest/api/2/project/{projectIdOrKey}' | jq '.issueTypes[] | {id, name}'
{
  "id": "10002",
  "name": "Task"
}
{
  "id": "10003",
  "name": "Sub-task"
}
{
  "id": "10001",
  "name": "Story"
}
{
  "id": "10004",
  "name": "Bug"
}
{
  "id": "10000",
  "name": "Epic"
}

More details about project/{projectIdOrKey} endpoint could be found at Jira REST API documentation.

Querying data from Jira DB:

This method will not require Jira Administrator permissions, however you will need to have access to Jira database

In order to get list of issue type IDs, you will need to query 'issuetype' table:

jiradb=# select id, pname from issuetype;
  id   |             pname
-------+--------------------------------
 10001 | Story
 10002 | Task
 10003 | Sub-task
 10004 | Bug
 10100 | Initiative
 10101 | Incident
 10102 | Service Request
 10103 | Service Request with Approvals
 10104 | Change
 10105 | Problem
 10000 | Epic
 10200 | New Feature
 10201 | Support
(13 rows)



Last modified on Jan 8, 2024

Was this helpful?

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