Integer field "null" value sorting
NetBox version
v4.2.8
Feature type
Change to existing functionality
Proposed functionality
Currently sorting of numeric fields puts "null" value field first. Proposed functionality would put "null" values last.
Use case
We have created Integer Custom Field "PoP ID" where we store value of Site. But since we need to keep track of many sites, only fraction of Sites have this field filled. When we want to sort sites by this field we have to go through many pages of empty values (i could be done by filtering, but for many users sort is more convenient).
Database changes
None
External dependencies
None
What specific change(s) are you proposing? Is this specifically for integer custom fields, or elsewhere?
I propose changing the sorting behavior so that entries with null values appear at the end, while fields with actual values appear first.
My current use case involves a Custom Field with integer values, but I believe this behavior could be beneficial for all numeric sorting in NetBox.
Ideally, this could be implemented as a configuration option in configuration.py, allowing administrators to choose how null values are handled during sorting.