Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Order by Rank and Priority

I want to order by rank and then by priority. All my readings points me to this can't be done. I'm confused as to why?

ORDER BY Rank ASC, priority DESC

This would allow cards to be able to be dragged on the column up and down based on rank and also would set a default so that any highest priority items be set to the top.

Can anyone tell me why this can't be done?

3 answers

Ranking is a definitive number, each issue will be ranked in relation to other issues.
If you have three issues A,B and C, consider their ranking a number that will be assigned to each issue
1 A
2 B
3 C

If you move them around, the rank will be assigned to another issue.
1 B
2 A
3 C

Not sure if the explanation makes sense, but no matter other fields a ranking will always be definite as it's relative to the other issues you've ranked it against.

What I'd like to have is that if a highest priority item comes to us from support, it shows up on our board at the top, and still allow our Product Owner to re-order that column when desired. The issue I'm seeing is that if you set ORDER BY Priority DESC, Rank ASC, one cannot move work items on the board up or down because Jira says Rank is not being set.

Are you using swim lanes on the board?

Using a swim lane on top for high priority issues might be a viable option for you while still using rank

yes, that is the workaround. Not a fan, as swim lanes often clutter the board.

0 votes
John Funk Community Leader Jul 09, 2021

Hi JD,

I feel like Rank will always win out because it is a unique value for each issue. Meaning that Priority would never come into play in your scenario. I could be wrong, but the best advice I can say is try it and see what happens. It certainly won't hurt your data any. 

What I'd like to have is that if a highest priority item comes to us from support, it shows up on our board at the top, and still allow our Product Owner to re-order that column when desired. The issue I'm seeing is that if you set ORDER BY Priority DESC, Rank ASC, one cannot move work items on the board up or down because Jira says Rank is not being set.

Hi @JD Lobue 

Yup, drag-n-drop only works when ordering by Rank.

What type of project are you using?  If it is company-managed, you could set up swim lanes by queries, checking the priority for what you need at the top.  Then dragging will still work (within a lane).

Best regards,
Bill

0 votes

As John and Jonas mention, your "order by rank" will make the priority sort completely redundant.  It is not as simple as this and doesn't work this way in the background, but you can think of the rank being a unique value.  Unlike priority, you will never have two or more issues with the same rank.  So if your first sort is "by rank", no other sort is ever going to make any difference.

Consider:

  • ABC-123, rank = 1fdsfs, priority low
  • ABC-127, rank = 2dsfs, priority medium
  • ABC-132, rank = 3fdsfs, priority medium
  • ABC-234, rank = 4fdsfs, priority high
  • ABC-745, rank = 5fdsfs, priority low

Your sort is always going to come out in that order, because the ranks are in that order and are unique.  A secondary sort does nothing, because for each rank you have, there is only one issue to sort.

You say "if a highest priority item comes to us from support, it shows up on our board at the top"

That's fine, but the way to do that is not by sorting, because sorting by priority means you are no longer ranking and hence can't re-rank stuff.  You shouldn't be pushing things to the top of your backlog just because someone outside the team sets a field really, that's something the team (including the product owner) should decide to do and hence Jira doesn't really have anything that would do it - it's built to support the team deciding there may be an exception to their ranking, not accept other people forcing it on them.

If your process really is that though, you could go find an app that can re-rank issues automatically (Automation can't do this, from what I've seen) and set it up so that "if issue created has priority = X, rank it at the top of the backlog"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

886 views 2 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you