IDs in nodeassociation don't match IDs in jiraissue table in the Jira 6.x database schema

Julio Mugabe October 31, 2014

Looks like there is a huge disparity between Jira 5 and Jira 6 database schemas.

When I run the below statement on Jira 5.2.11, I get the desired results, no null values in pkey column. However when I run the same query on a clone instance running Jira 6.3.6, the values in this column are null. Where the table relationships get switched around? What do I have to do to have the same behavior or results in jira 5.

*********************
SELECT
A.pkey
FROM
jiraissue A,
nodeassociation C
WHERE
A.ID=C.SOURCE_NODE_ID;
*********************

2 answers

0 votes
Norman Abramovitz
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.
November 1, 2014

Backk at 6.1 time, the pkey column was made obsolete.   It was replaced by issuenum    

https://developer.atlassian.com/display/JIRADEV/Preparing+for+JIRA+6.1#PreparingforJIRA6.1-editprojectkeydb

Depending on what you need, you can join jiraissue.PROJECT field with the PROJECT_KEY.PROJECT_ID to get the PROJECT_KEY field.   You can concatenate the PROJECT_KEY and issuenum to recreate the pkey field.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 31, 2014

I don't really understand what the question is.  

The structure of the data has changed because it needs to for whatever reason.  I understand that this has broken a query you are running, but I do not see why it's a problem, because you don't explain what you are trying to get out of the query.  "What do I have to do to have the same behaviour" can only be answered by "understand the data properly and adjust your query"

Suggest an answer

Log in or Sign up to answer