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

Chelsea Brown November 28, 2017

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 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2017

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

Chelsea Brown December 4, 2017

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

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 4, 2017

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

0 votes
Alan Parkinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 28, 2017

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

Chelsea Brown November 28, 2017

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. 

Chelsea Brown November 28, 2017

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