How do i get 'RANK' field directly in DATABASE, any sql can do this?

yunfeng guo August 29, 2013

As subject. We found some OA table related to 'rank' in database, but we have no idea about the logic and relationship of those tables. Can someone help me?

6 answers

1 accepted

0 votes
Answer accepted
Chris Collins April 6, 2014

OK, it turns out that the Global Rank is held as a linked list, making evaluating specific "Global Rank Value" more difficult.

A bit more digging turned up this answer, which I will play with: https://answers.atlassian.com/questions/96142/how-to-get-sprint-issue-list-by-sql

0 votes
CGM April 7, 2014

Thanks for your help:-)

0 votes
CGM April 6, 2014

Hello,

I have the same problem. Is there any solution for that problem?

Chris Collins April 6, 2014

I have opened a support ticket - I'll post any progress here.

Qasim Rasheed November 28, 2014

Has there been any progress on the support ticket?

0 votes
Chris Collins April 2, 2014

Sorry to open this old question again, but I am having the same problem.

For example, I have an issue ID 18892 corresponding to a key ABC-123.

If I use your SQL above I get a rank of 7944.

If I create a filter in JIRA and select to display the Rank column, the rank number shown for that issue is 849.

If I use SQL to see what issue ID has rank 849, it is not the issue ID that I'm looking for.

Any ideas?

0 votes
yunfeng guo September 1, 2013

Hi Danial,

Thanks a lot, but i was confused whether 'ID' is exactly the 'RANK' where i view in the issue view page. I'm afraid that the ID doesn't directly refer to the value of 'RANK'. So where can we get the exact value of rank for a specific issue in DATABASE.

0 votes
AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2013

Hey there, Yunfeng.

I believe that you are referring to the AO_60DB71_ISSUERANKING table here. As we can see from the structure:

  1. CUSTOM_FIELD represents the Rank custom field
  2. ID represents the rank of the issue
  3. ISSUE_ID represents the ID of the issue that has the respective rank
  4. NEXT_ID is the link to the next ID of issue that is related to the ISSUE

So, if you want the Rank of an issue, let's say the issue ID is 10004, it can be something like:

SELECT ID FROM AO_60DB71_ISSUERANKING where ISSUE_ID = '10004';

Hope this helps.

Warm regards,

Danial

yunfeng guo September 1, 2013

Hi Danial,

Thanks a lot, but i was confused whether 'ID' is exactly the 'RANK' where i view in the issue view page. I'm afraid that the ID doesn't directly refer to the value of 'RANK'. So where can we get the exact value of rank for a specific issue in DATABASE.

yunfeng guo September 8, 2013

Hello, any update?

Theinvisibleman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2013

Hi Yunfeng,

If I understand Danial correctly, then the 'ID' of the AO_60DB71_ISSUERANKING table is actually the 'RANK' of the issues. Take the SQL query that he has provided as an example :

SELECTID FROMAO_60DB71_ISSUERANKING whereISSUE_ID = '10004';

This query would return the 'RANK' of the issue that has the issue ID of '10004'. Hope this clears things up a bit :)

Suggest an answer

Log in or Sign up to answer