Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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
Answer accepted

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.

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you