Status custom sorting - order by?

Tigly Migly
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2023

Hi,

I have a filter with the list of the issues, I want to sort them by statuses so that: 

'In progress' is first, 

'Open' is next,

rest of the issues (closed, implemented etc).

Any standard way how to right jql 'order by' for this?

Is there any jql standard functions alike (if then else), decode, or (case when then end)?

Thanks!

 

3 answers

0 votes
Ashley
Contributor
October 25, 2024

I'm not sure why @Alexander Christian was having issues. Perhaps it was a bug that they indeed fixed. 

 

@Tigly Migly 

When I sort the statuses in Settings → System → Issue Attributes/Statuses:

2024-10-25_07-56-55.jpg

I've found that this ordering is being respected in queues, on columns in widget dashboards, and when using JQL ORDER BY ASC/DESC.

0 votes
fev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 18, 2024
0 votes
Dave Mathijs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2023

Hi @Tigly Migly welcome to the Atlassian Community!

ORDER BY is only ASC or DESC, you cannot define a non-alphabetical order.

Tigly Migly
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2023

Dave, thank you for the swift response!

ugh, you broke my heart. 

Radek Dostál
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.
March 29, 2023

Closest to that would probably be a combination,

ORDER BY resolved, status

which should give unresolved issues on top, resolved on bottom, sorted by status through the first "section" (open, in progress). The resolved section will probably not be sorted by status at all since resolved should be distinct values, but at least something a little closer overall.

Dave Mathijs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2023

@Tigly Migly  Although my answer is - understandably - not the one you expected, thanks to click the green Accept answer button if it answered your question.

Alexander Christian
Contributor
February 22, 2024

@Dave Mathijs 
I cannot confirm this. Its sorted by something else, but not alphanumeric or alphabetical.

proof:
Screenshot 2024-02-22 133533.png

 

How can it be, that when sorting by status, a status beginning with "P" is between two other status beginning with "V"?!

I also don't understand why I can set an order in:

Jira Settings -> Issues -> Issue Attributes -> Statuses

Screenshot 2024-02-22 133936.png
Here I have set the correct order of my statuses:

Screenshot 2024-02-22 133956.png

 

But it looks like this order is used nowhere...

Can you shed some light on this and explain?

Right now, this looks like a bug to me ...

best regards,
Alex


P.S. using Jira Professional Cloud.

Mike Rubin May 13, 2024

+1 to this question / request

Like anne.gerten likes this

Suggest an answer

Log in or Sign up to answer