Where is pkey store ??

Philippe Schram September 24, 2013

Since we migrate to Jira 6.1, the field pkey in jiraissue table was set to NULL.

I need to generate KPI and pkey is used ... I need to adapt some sql statements but did'nt found where pkey is now store :-(

Tks for help,

Philippe

2 answers

1 accepted

4 votes
Answer accepted
Tiago Comasseto
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.
September 24, 2013

Hi Philippe,

To make the operation work fast we had to change JIRA internal storage, from now on jiraissue table store issue keys divided into project and issuenum. You must no longer use pkey and we null it in one of the upgrade tasks. There's also a new table storing all historical keys for a project. Read details in Preparing for JIRA 6.1.

I hope it helps.

Cheers

Bryan Karsh
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.
May 22, 2014

This is not elegant, but you'd want to do something like this (mysql example):

select concat(b.pkey, '-', a.issuenum) as PKEY
from jiraissue a, project b
 
where 
a.PROJECT = b.id
and b.pkey = 'FOO'

1 vote
Rena Sawyer April 15, 2014

Hi Philippe,

The numeric value that used to be part of jiraissue.pkey is now stored in jiraissue.issuenum. The alpha part of the old pkey can be found in project.pkey for the issue's related project.

Suggest an answer

Log in or Sign up to answer