Hi,

I have tried both numeric and natural to sort fields through a views table display and notice that numerics with decimals are not sorted properly. For eg, 2.4 and 2 are equal in the sorting context. Only alphanumeric sorts decimal correctly from the tests I have done.

But am I using the correct sort for decimal numbers?

Thanks!

Comments

infojunkie’s picture

Assigned: Unassigned » infojunkie

What do you mean by "2.4 and 2 are equal in the sorting context" ? Do they not appear in the right order when you sort the table by the PHP Code field? Can you share your code snippet that produces those values?

jeffschuler’s picture

Status: Active » Postponed (maintainer needs more info)
weka’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I just tested this and am not able to reproduce the problem.
Customfield: PHP code is set to Sortable > Numeric
Default sort order: Descending
Row with value 5.00001 displays correctly above row with value of 5.

Feel free to reopen this issue if you still experiencing the problem and provide more details so others can try to replicate. See the How to make an issue report page for guidelines.