Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting number fields in descending order. Null values appear first? That's weird

Jim Hathaway
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!
August 8, 2025

I have a number field that I want to user order by desc in a JQL query.

Most records are populated with a number but some are empty. the search results appear to sort the empty/null values first, then high numbers to low numbers.

This is counterintuitive. Empty or Null values should be in the same place as Zero or below the lowest number, not at the top.

Can I fix this with some clever query or is it not working the way I expect it to and Atlassian need to fix it.?

2 answers

1 vote
John Funk
Community Champion
August 8, 2025

Hi Jim - Welcome to the Atlassian Community!

Any reason to not default the field to 0?

Do you need to see the work items without a value? You could exclude those in the query. 

Not sure why it is showing the null values first. Does DESC put them at the end? 

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
August 10, 2025

Hi @Jim Hathaway

welcome to the community!

I agree with you that the sorting behavior is unexpected - however apart from John's suggestion above, I'm not aware of any ways to work around this in native Jira.

This being said, if you're open to solutions from the Atlassian Marketplace, you have more options available. E.g., this would work as expected in the app that my team and I are working on: JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting.

Plus, of course, it sorts number fields just like to described:

number-sorting.gif

This just works - there's no changes to your data whatsoever required.

Any questions just let me know,

Best,

Hannes

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events