'ORDER BY status DESC' Is there any other ways of ordering in JQL?

Nannaakan November 23, 2016

Hi,

I wanted to order a column. I know I can use DESC or ASC, but is there any other way to order. Can I give my own preference in ordering:

Eg. Order like --> Status --> First Done, Second - In Testing, Third - Rejected etc.

I am trying to match SQL query similar to this but could not. Do you have a guide or ability for this in JQL.

 

3 answers

1 accepted

20 votes
Answer accepted
Sam Hall
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 23, 2016

Your only option in JQL is to order status by DESC or ASC. There is information on using the 'ORDER BY' keyword here.

However, you can set the order of the statuses will be listed using the Statuses admin page, which can be found via Administration > Issues > Statuses. The URL to get there will be: 

https://<YOUR_JIRA_URL>/secure/admin/ViewStatuses.jspa

On this screen you can use the little arrows to change the order of the statuses:

status-order.jpg

This will change the order they show in on the search screen.

For example, if you move "Done" to the top on the Statuses admin page, it will show first on the search screen when you do JQL like: 

order by status ASC

Hope this helps a bit.

Sam

Rosa M Fossi September 14, 2017

Thanks Sam Hall!

Question: Is there no other way to update those? What if you have 54 statuses, and you need to move #38 to #1? 
Do I really have to click the up arrow 37 times and wait for the page to reload each time? :( :( :(

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2017

In later versions, you can drag the dotted metal panel into the right place, rather than have to click 37 times, although you're still going to get a page refresh on each move.

Like Dave_Liao likes this
Rosa M Fossi September 19, 2017

Hi Nic, as far as version, we are JIRA cloud.  I also found out if I press the up-arrow 6-8 times, it registers most of those clicks and moves up 6-8 slots. That made it a little more bearable, but I still spent over an hour moving statuses around. 

Deleted user May 17, 2018

Hi Nic Brough [Adaptavist], can you explain what you mean by the "dotted metal panel"? I am on /secure/admin/ViewStatuses.jspa using 7.5.2.

Rosa M Fossi May 18, 2018

Craig~ I assume he means the ":::::::" bars (vertical though, not horizontal) next to the status itself. On my version (cloud) I still only have the arrows, but the server version may have those bars that allow you to drag and drop.

Rosa M Fossi May 18, 2018

Here's an example from my "request type" section.  I can drag these up and down as needed. 

Bars Next To The Types.png

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2018

Yes, thank you @Rosa M Fossi that's exactly what I meant.  A server install of Jira will have either arrows or the bars, depending on version.

Deleted user May 19, 2018

Thanks @Rosa M Fossi for clarifying, I know what @Nic Brough -Adaptavist- means now. Oddly, I still can't see them, neither in Chrome nor in Firefox (see below). Am I just not seeing it? I just upgraded to 7,9.2, FYI.

I have always been confused by "JIRA Server". Mine is self-hosted. Does that equate to JIRA Server?

BTW, @Rosa M Fossi, love your avatar!

Craig

 

Craig's JIRA Server - Statuses - no drag-n-drop bars.png

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2018

You have the arrows as Sam described earlier, use them to order the status.

If you are running "self hosted", it is Jira Server, (or Data Centre, which is essentially several Jira Server installs hooked together)

Rosa M Fossi May 20, 2018

@[deleted] hahaha! thanks. I chose it because in my company I often seem to be the go-to person for "I would like..." and "I sure wish that..." and "if the system could do x...".   I guess everyone thinks I am a genie that grants wishes. LOL!

Also~ see my post from Sept 19th 2017.  It's a bit of a pain, but if you have a huge list of statuses like mine, you can hit the arrows 6-7 times and it will climb by that many before the screen refreshes. 

Deleted user May 20, 2018

@Rosa M Fossi love it! As for your suggestion from Sep 19, 2017, thanks, I missed that.

@Nic Brough -Adaptavist- Yes, I know I can use the arrows; I was just hopeful that because I have JIRA Server, latest version, the statuses would be draggable, no? You wrote, "A server install of Jira will have either arrows or the bars, depending on version." Does that mean that draggability is only on older versions?

adolf garlic January 17, 2019

The more I use jira and find basic functionality like this lacking, the more I realise it's little better than a poorly designed CRUD system + public emails (i.e. threads are visible by all)

 

Can I do simple thing in jira?

most common answers:

 - no

 - yes if you install x for which your company will not allow or pay for

 - yes if you are a sys admin which you are not

 - this is on our backlog to fix

Like # people like this
Azfar Masut
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 3, 2019

There're no way to drag and drop the status as far as I know (712.3). Just click the arrow till you break your mouse

0 votes
Martin Cleaver
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.
August 3, 2019

And you can't order by StatusCategory, which would also have been useful 

Usamah zagaar April 17, 2020

Yes, exactly, are these Jira creators are using their product? You would think these features would be included out of the box. Very Strange and not well thought out.  And where are the JIRA support team responding to this question/feature? Let me guess, ignore loyal customers and see who votes on the most wanted new feature. Unacceptable support model for new features. These common-sense types of features should be out of the box not voted on by users to be included in the future releases.  

0 votes
Deleted user May 22, 2018

Hello Sam Hall,

Thanks for the above answer. We have lots of projects in our JIRA self-hosted instance and the same statuses used by multiple projects/workflows. If I do the above changes for one project, will it impact to others or is there any other way to make the changes for a specific project.

Sam Hall
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.
May 26, 2018

HI Bishnu - the status order in the configuration page is global. The order you pick there will apply to JQL search results regardless of project.

Suggest an answer

Log in or Sign up to answer