Bug - Filter sorting when string starts with numbers

I noticed this issue in two customers, when the title of a field starts with numbers (enumerating them) the sorting goes mad and does not work. this is because the sorting is meant to be used with “letters” [a-z] and not numbers.

int ref: https://github.com/eramba/eramba_v2/issues/2328

Looking at this, we actually found it works as we (at least we) expected: 1.2 is smaller than 10.1 and 10.2 , so the “ascending” looks ok.

Can you perhaps give us another example?

What the screenshot doesn’t show is I have a 2.1, 3.1, 4.4, and etc that should be between 1.2 and 10.1.

This was fixed in 2.7. If you are already updated to latest version can you confirm that issue is no longer present?

The issue is still present, even after the update.

1.7 is smaller than 10.1 - or we are missing something else?

we tested this functionality also in google sheets and this is the result:

Screenshot 2019-10-04 at 15.34.08.png
The problem is that this field is string not a number.

Any suggestions on how I can solve my issue?

We are not able to understand what issue you have, can you send a csv import or a csv with a column including the names on your items so we can test exactly what you have? (support@eramba.org) as shown above we dont understand what the problem is so we dont know what needs to be fixed.

The field you want to sort on is a “string” (letters/text) and you’re trying to sort by numeric values. String sorting works more like an alphabetical list (i.e. replace the numbers with a/b/c/d and you’ll understand what it is doing). In order to make string sorting work as you expect, you need to pad with leading zeros.

For example, if you expect no more than 2 digits before and 1 digit after the period, then the numeric 1.1 should be 01.1 in your item description.


Looks ugly haha, but that does work. Thanks.