Where can I find a complete list of all ORDER BY options?

Steven Robinson January 7, 2021

I am having trouble locating a full list of ORDER BY options... when I use the Issue Navigator it shows the first 10 or so options and then indicates there are ~465 other options but I can't scroll through them.  So, I need to type a keyword in order to see if it exists.  Is there a comprehensive list somewhere?  When I tried google searches I couldn't get past finding syntax related questions.  I have no idea how to narrow my search.  If anyone can point me to a comprehensive list of sort options (with descriptions of what they do would be a plus as well).

Thanks!

3 answers

2 accepted

1 vote
Answer accepted
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.
January 7, 2021

There's no direct "comprehensive list" because the list is variable and unique to each instance.  The short answer is "Order by <any of your fields>"

The technical rule  for the list is "Any field that uses a searcher that provides ordering".

The longer version is that the list is made up of

  • System fields
  • Aliases for system fields (due and due date for example)
  • Fields provided by Applications such as Software or Service Desk
  • All custom fields (that have been given a searcher that supports ordering - by default, they all are, but I mention it because you may have someone who wanted a field that can't be searched or sorted, and hence removed the searcher for it)
Ed Maschler May 25, 2023

Is there a way to specify the order, not just ASC or DESC?
For instance:  I want to do it by Statuses.  Our Statuses follow a certain order based on the workflow.  When I run the report, I would like NOT to have to rearrange the output because the Status names in alpha order do not match the workflow

Like # people like this
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 26, 2023

As I already said, try "order by <what you want to order by>".  Order by Satus asc/desc, order by colour asc/desc, etc.

Ed Maschler May 30, 2023

Nic, please re-read my question. It is not a simple asc or desc. its being able to make it sort by a specified order like: (To Do, Ready for Dev, In Progress, In PR, In Review Dev Env, Ready to Merge to QA Environment, Ready for QA, QA in Progress, Ready for UAT, QA in Progress, UAT Complete, Done)

Like # people like this
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 30, 2023

I understood your question the first time.  As I aleady said, try "order by <what you want to order by>".  Order by Satus asc/desc, order by colour asc/desc, etc.

Meg Fletcher May 31, 2023

Hi, I'm very new to Jira but interested in custom sorting.

For example I have priorities ie. blocker, major, normal, minor.

BUT.  the order by DESC goes blocker, major, minor, normal.  (alphabetical)

Is it possible to customize the priority? this is the current filter used ORDER BY priority DESC

thanks

Like Amy McCann likes this
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 31, 2023

"Order by" looks at how the option list is organised now.

tristan_cruickshanks June 4, 2023

Hi @Nic Brough  I agree with @Ed Maschler  - we can Order by status (asc) but that puts the gadget in alphabetical order rather than in the order of the workflow making it harder to read.  Do we have to ensure our workflow is in alphabetical order or pre-fixed with a number to make this easier?

 

Like Amy McCann likes this
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.
June 5, 2023

It's the same answer.

Like Sam Bartolome likes this
Jane Bentley August 15, 2023

Hi - new to Jira so apologies if this is a daft question - how can i order filter output to come by their hierarchy, so i see a parent and all its child tickets together ?

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.
August 19, 2023

Welcome to the Atlassian Community!

Not daft at all.  It's something Jira does not yet do well, but I've been fixing it for over decade by scripting a (read-only, but sortable) field that appears on all issues and their sub-tasks.  It contains <parent issue key> for the parent, and <parent issue key> / <sub-task issue key>  Sorting on that string groups all of them together.

(I really should look at writing that in Scriptrunner for Cloud)

Patrick Finnegan March 27, 2024

I read through this thread as I have the same request about customizing the sort order for a field vs using ASC or DESC.  Was that question answered and is there a way to do that currently with a JQL query?

Example of what I'm hoping for:
project = <project name> and status not in (closed, canceled) order by component (customized order of the components)

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.
March 27, 2024

I am sorry, but Jira doesn't do the (customized order of the components) bit.

Patrick Finnegan March 27, 2024

Thanks for the quick response, @Nic Brough -Adaptavist-!  Is there a process to request this as a potential future feature?

0 votes
Answer accepted
Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 7, 2021

Hello @Steven Robinson 

There is no "strict" list on this but you can order by any field or custom field.

From Atlassian documentation

"Used to specify the fields by whose values the search results will be sorted.

By default, the field's own sorting order will be used. You can override this by specifying ascending order ("asc") or descending order ("desc")."

Order by  documentation.

BR, Olga

Ed Maschler August 18, 2023

But that is just predefined asc or dsc.  I want to be able to give a custom order list

Like # people like this
Issam Helewa September 29, 2023

Same here I want to explicitly order types verus asc, desc since the output would make sense when review from a list.

ORDER BY Type {Epic, Feature, "User Story", Task}

NOT

ORDER BY Type desc

Like # people like this
1 vote
Francisco Soto November 10, 2023

I'm using this JQL on the search:

 

key in (asd-1, asd-5, ddd-108, asd-4, ddd-42)

 

I want to see the result of the search in that same order. How can I do this?

 

ps: note that I'm looking at two different projects ASD and DDD

 

Thanks!

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.
November 10, 2023

Welcome to the Atlassian Community!

This cannot be done - you cannot sort on elements in your query, you can only sort by fields.

Matt Loughran March 12, 2024

@Nic Brough , like @Issam Helewa I would also like  order by Type but I don't see a Type option when I enter it into the Order By list. Can you speak to this? Is "Type" not a "field?"

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.
March 12, 2024

It's usually "issue type"

Matt Loughran March 12, 2024

@Nic Brough ah, yes.... thanks! Found it.

Like Nic Brough -Adaptavist- likes this

Suggest an answer

Log in or Sign up to answer