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

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

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

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

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? :( :( :(

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

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.

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.

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

Bars Next To The Types.png

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

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)

@[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?

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

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

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

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.  

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.

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
TAGS

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