Implement task sorting in ascending or descending order
Is your feature request related to a problem? Please describe.
Currently tasks are sorted only by due date, so users have to manually identify tasks that are most urgent. The update takes into account both a priority score and due date to prioritize tasks.
Describe the solution you'd like
Extend the sorting logic to sort tasks as follows:
- Priority values are positive numbers
- Higher priorities sort first
- Equal priorities sort by due date
- Invalid/missing values sort last while adhering to the above
Describe alternatives you've considered
- Store an array of priorities per task for e.g. [not due, due, overdue], then let the WebApp pick the correct one. This turned out to be rigid and complex to maintain.
- Sort entirely by due date and then priority. This does not fully capture the intended urgency based on individual conditions.
- Sort overdue tasks by due date, and all other tasks by priority. This sounded great, but less consistent for borderline-due tasks.
I can help update the description. Please assign it to me.
Some description was added to the pull request instead. Will work with @sookwalinga to get this out.
Some minor updates/rephrasing:
Is your feature request related to a problem? Please describe.
Currently tasks are sorted only by due date, so users have to manually identify tasks that are most urgent. The update takes into account both a priority score and due date to prioritize tasks.
Describe the solution you'd like
Extend the sorting logic to sort tasks as follows:
- Priority values are positive numbers
- Higher priorities sort first
- Equal priorities sort by due date
- Invalid/missing values sort last while adhering to the above
Describe alternatives you've considered
- Store an array of priorities per task for e.g. [not due, due, overdue], then let the WebApp pick the correct one. This turned out to be rigid and complex to maintain.
- Sort entirely by due date and then priority. This does not fully capture the intended urgency based on individual conditions.
- Sort overdue tasks by due date, and all other tasks by priority. This sounded great, but less consistent for borderline-due tasks.