JQL keyword
ORDER BY in JQL: syntax and examples
ORDER BY decides the order of the results. List one field or several, each with its own direction, at the very end of the query. Without a direction, the field's own default order is used.
Syntax
... ORDER BY field [ASC | DESC]
... ORDER BY field1 [ASC | DESC], field2 [ASC | DESC]
Arguments
| Argument | What it does | Optional |
|---|---|---|
field | The field to sort by. Separate several fields with commas. | yes |
ASC or DESC | Ascending or descending. Each field takes its own. | no |
Works with
- Fields: most fields, including Priority, Created, Updated, Due date, Status, Assignee, Key, Rank
- Placement: the last part of the query, after every condition
- Not with: Comment, Text, Attachments and Work item link type
Examples
project = WEB AND statusCategory != Done ORDER BY priority DESC, created ASCThe work list for a stand-up: most urgent first, and oldest first within each priority.
Run on Jira Cloud on .
project = WEB AND statusCategory != Done ORDER BY duedate ASCDeadlines in order, soonest on top. Work with no due date comes last.
Run on Jira Cloud on .
project = WEB AND sprint is EMPTY AND statusCategory != Done ORDER BY Rank ASCThe unscheduled backlog in the order the team ranked it.
Run on Jira Cloud on .
project in (WEB, MOB) ORDER BY project ASC, status ASC, created DESCThree sort keys: grouped by project, then by status, then newest first inside each group.
Run on Jira Cloud on .
project = WEB ORDER BY updated DESC, key ASCLatest activity first, with the key as a tie-breaker so items changed together always appear in the same order.
Run on Jira Cloud on .
project = WEB AND statusCategory != Done ORDER BY created, priority DESCEach direction belongs to the field before it: created uses its default order and only priority is descending.
Run on Jira Cloud on .
Pitfalls
- Nothing can follow it except more sort fields.
project = WEB ORDER BY created DESC AND status = Donefails with "Expecting ',' but got 'AND'.", and a second ORDER BY fails the same way with "Expecting ',' but got 'ORDER'." - Some fields cannot be sorted.
ORDER BY commentreturns "Field 'comment' does not support sorting.", and the same message appears for text, attachments and issuelinktype. An unknown name gives "Not able to sort using field 'nonexistent'." A direction other than ASC or DESC fails with "Expecting either 'ASC' or 'DESC' but got 'sideways'." - Empty values go to the far end. With
ORDER BY duedate ASCthe undated work is at the bottom, with DESC it opens the list, so a deadline list sorted descending starts with items that have no deadline (checked on Jira Cloud, November 2026). - Priority without a direction already lists the highest first, so
ORDER BY priorityandORDER BY priority DESCagree, and ASC reverses it (checked on Jira Cloud, November 2026). Atlassian also notes that sorting by component or version groups by space first and only then by the field.
Ready-made queries
- Overdue work items
- Due in the next N days
- Unassigned open work
- My open work
- Current sprint
- Still open in the current sprint
- Created in the last N days
- Updated today
Questions and answers
Can I sort by more than one field in JQL?
Yes. Separate the fields with commas, and give each its own ASC or DESC. The first field is the main sort and the later ones break ties.