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

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 vote

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"

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

58 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you