Returning the rank of an issue in a board with SQL query

How can I get the ordered rank of an issue from a board it is referenced in?

1 answer

0 vote

The data is in AO_something_LexoRank, with an issue id so you can join it to jiraissue, but it's not going to be that helpful to you in raw SQL.

To know what board it is on, your SQL will have to read the board details to find out what the filter is, read the filter and reproduce it in SQL (bearing in mind that even the most "simple" query in JQL could require a many multiple joins), and then use it to select from the AO_lexorank table.

Once you've got that done, you need to understand the ranking data, and that's "fun" because it's not a simple number.  At first glance, it does look like a simple string that you can sort alphanumerically, but that is the general case and it does not always work.

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...

800 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