Forums

Discuss all things Remember The Milk.

menu

Natural numeric sorting

ultrapasty says:
Hello
I've just added 20 tasks, each one is preceded by it's number -- eg:

1: This
2: That
...

However, when I get to 10 it goes like this:
10: This
11: That
1: Blah
2: Blah

I'd like it if the numbers were naturally sorted, in a similar fashion to the effect that php's natsort() function produces.

Thanks, and loving RTM. Don't know how I managed without it ;)
Posted at 9:27pm on December 20, 2005
rakesh says:
I know you asked for the natsort similar function.

But a workround would be to number the single digit tasks with a preceeding zero. Eg: 01, 02, 03.

This should sort the numbers after '10' the way you want them to be sorted.
Posted 20 years ago
ultrapasty says:
That would be an acceptable workaround -- I'll use that for now :)
Posted 20 years ago
emily (Remember The Milk) says:
Sounds interesting -- we'll check into how natsort() works. From a quick glance so far, it sounds like it would make sense to sort something like this.
Posted 20 years ago
This idea is considered similar to "Support for numerical sorting of task names", and all votes have been transferred to that idea.