Project:Views Custom Field
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:infojunkie
Status:closed (cannot reproduce)

Issue Summary

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

#1

Assigned to:Anonymous» 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?

#2

Status:active» postponed (maintainer needs more info)

#3

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.

nobody click here