Getting issue rank via JQL and SQL

If I run a JQL query to bring back the Rank of an issue, I am getting a different value to the value obtained by running an SQL query directly on the database meaning issues in my spreadsheet appear in a different order to how they appear in JIRA. Am I missing a join somewhere?

For example, in JQL the rank for issue XXX-650 is 4597.

If I query the database directly with the following SQL query, I get 5660.

  public.jiraissue.pkey = 'XXX-650' AND 
  public."AO_60DB71_ISSUERANKING"."ISSUE_ID" =

Is the ID of the ISSUERANKING table the Rank value used by JIRA? From other answers, I think so. In the database, if I look for the issue with the Rank 4597, it is a completely different issue (of course).

Any guidance would be much appreciated.

1 answer

1 accepted

Hi Chris,

In the latest versions of Jira Agile Rank became a custom field.

So you might need to take a look at the custom fields tables in your database.

Just an idea.

Best regards,


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

809 views 2 19
Join discussion

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