Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×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.?
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?
Thanks for the reply. Yes, I need to see the work items with empty values, just at the bottom of the sorted list, not the top.
The value is for CVSS Score. Anything from 0 to 10 is a valid value but for some things CVSS is Not Applicable and this has been left empty.
Looks like I'm going to have to bulk-update everything that's empty to a -1 :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Definitely a route to go. You should also open a support ticket with Atlassian to see if this is a bug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
This just works - there's no changes to your data whatsoever required.
Any questions just let me know,
Best,
Hannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply, the last time I tried to get something from Marketplace added into our Jira, the approval process took 9 months. I don't want to have to go through that again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.