Upcoming View Sorting

Currently the tasks due soonest are at the bottom of the list in the “Upcoming” and “Overview” sections, rather than the top.

I’m not sure if this is a bug or intentional, but it would be great to have the option to see the closer due dates at the top of the list. :slight_smile:

EDIT: Looks like this is only an issue in the desktop view; accessing from my phone has closest due date at the top.

1 Like

That sounds like a bug. Can you reproduce it on try?

Yep, if you check out the Overview and Upcoming sections on your try link, tasks are sorted by due date in reverse (later dates higher in the list).

I’ve also just noticed that in the table view for a task list clicking the due date column header for sorting doesn’t do anything (ie. no sorting by date when clicked). I can confirm the bug was present in your demo as well.

EDIT: Given I was having other issues which appear to be caused by Safari, I rechecked this in chrome for macOS and I can confirm that the issue is still present (so its not a browser issue).

That definitely sounds like a bug. Will take a look.

Ok, I apologise but it looks like I was mistaken for some reason and the reverse sorting ONLY occurs on Safari! I am actually wondering if it’s related to the issue I was having with the quick-edit of due dates. I’m thinking Safari does something funky with date/time.

The table sorting is still an issue whether I use Firefox or Safari, so that looks to be something more general.

Did some digging and it turns out, that’s kind of intended behavior. By default a sorting by task index is always pre-selected. This goes largely unseen but has a massive impact on sorting: All sorting columns are applied in the order of selection. Therefore, when you sort by due date while sorting by task index is enabled, it sorts by index first, and then due date. The index sort column takes precedence over the due date filter, making it pretty much obsolete.

Because this is confusing and doesn’t make much sense, I’ve changed this in 9cee720ac9 to makes sure the index sort column is always passed in last. Please test it on try in ~30 min.

I would like to handle the task sorting on the overview pages entirely on the server in the future which should fix these cross-browser issues with safari.