Why doesn't the query to search a Sprint's contents show in Prioritized Order?

When trying to export an upcoming Sprint in prioritized order, the query I found doesn't work.

 

project = <project name> AND Sprint = <sprint id> ORDER BY Rank

 

This was said to work by multiple users on other forum questions, but it won't work for mine. Any ideas why not?

2 answers

1 accepted

0 vote

Hi Chelsea,

The query you have will order these issues by their rank value.   I'm curious to learn more about what you're trying to do here.  You mentioned exporting this data.   I'm curious if you are maybe trying to export all theses sprint issues in order to then import them again either here or on another Jira instance.

If that is the case, the order the issues appear in that JQL query will match up with the rank value each issue has in this Jira instance.  One of the gotchas here though is that when you export these issues from Jira, you might not actually be exporting the Rank value associated with that issue.   For example if you just export to CSV the visible fields, and Rank isn't among them, the issues will still be in the order of that Rank, but if you then go to import these issues to a different Jira instance, if you aren't mapping the Rank field on import (or your export doesn't contain the rank value too), then it is possible that Jira is giving all these newly imported issues different rank values.

Jira Software is using a lexoranking system to give each issue a ranked value.  It can be hard to see and understand what this value is for each issue.  The specific value for each issue can change as issues are re-ordered on a board or backlog.  

What I would suggest would be to include this Rank field in the issue navigator of Jira.  Steps on how to do this are in Configuring the default issue navigator.  This way you can really see what the rank value itself is for each issue.  That way you can then know if the problem is in regards to the way issues are being sorted, or if in fact the problem is really the specific rank values each issue has vs your expectations.

Try this and let me know if this helps.

Andy

Thanks Andy! I took your advice and added the Rank column to view what is stored there. As it turns out, sorting by this is equivalent to sorting by Key which is the Jira Issue ID. 

I found that there are several Rank columns some of which are labelled Legacy and Legacy Obsolete. In my organizations, the Rank (Legacy) column is the one which captures the sort on the backlog and/or sprints. 

I've updated my query to reflect it:

project = <project name> AND Sprint = <sprint id> ORDER BY "Rank (Legacy)" ASC

Ah that makes sense.  Not all environments have these multiple rank fields, but that's good to know.  Glad to hear this helped.

Hi Chelsea

Does this query work for you:

project = "Project Name" AND Sprint in (futureSprints()) ORDER BY Rank ASC 

 Sometimes it's also worth trying to reindex Jira

What I meant was that the query displays the results but they're still ordered by the Key. I'll try your query to see if the Rank works. 

Your query has the same result for me. It's like Jira is treating Rank as synonymous with Key.

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 May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,239 views 10 18
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