What is the difference between id, pkey and issuenum in the jiraissue table

Siddhant Bane January 3, 2020

The jiradatabase schema shows the id, pkey and issuenum fields for the jiraissue table.

All three of them seem to be IDs of some sort but I want to understand what exactly do they represent and what are they used for. Especially the issuenum field as it is not connected to any other table and is also not unique in the jiraissue table.

Screenshot from 2020-01-03 13-53-28.png

 

3 answers

2 accepted

1 vote
Answer accepted
Deepanshu Natani
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 3, 2020

Hi @Siddhant Bane 

id is the internal ID of the jira issue which is internally used in Jira database to refer to an issue. This is the unique ID for a jira issue and does not change.

issuenum is the numeric part of the Jira issue key which is visible to you on the UI. For example if the visible Issue key of one of your Jira issues is AL-17, then "issuenum" for this will be "17". This value can change if you perform operations like moving the issue to some different project.

pkey should no longer be in use in this table.

1 vote
Answer accepted
Monika Danielsson January 3, 2020

id is the database-internal thing used to link the issue in the database. This is what you will find in other tables. 

issuenum is what you see when you look at the issue; e.g., for issue KEY-4711, the issuenum will be 4711.  Since you can have both issues KEY-4711 and OTHER-4711 in you jira, this won't be unique - but the combination project + issuenum will always be unique. 

pkey is always null in my Jira; perhaps an old column used to link to project before the "project" column appeared? 

1 vote
Adria Alonso
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2020

The issue key can change, the ID won't.

You may create PTR-213 with the ID 6568 and at some moment move to another project (STR) then will be STR-864 but the ID would still 6568.

The project goes apart

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events