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!

 

1 answer

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

Suggest an answer

Log in or Sign up to answer