Skip to content

Improve priority sorting by using due date as secondary key #527

@mulikruchi07

Description

@mulikruchi07

Describe your improvement idea or feature request

Currently, when tasks are sorted by priority, tasks with the same priority are not ordered further, which can lead to inaccurate or confusing ordering.

For example, multiple tasks with priority H appear in an arbitrary order instead of being ordered by urgency or due date.

How would you like to see it implemented?

  1. Sort tasks by priority as the primary key (H > M > L).
  2. When two tasks have the same priority, sort them by due date.
  3. Tasks without a due date should appear after tasks with a due date.
  4. Keep the logic local to each sorting implementation to match existing patterns and avoid cross-layer refactors.

Put here any screenshots or videos (optional)

Before:
Image

After:
Image

How can we contact you (optional)

No response

Would you like to work on this issue?

Yes

By submitting this issue, I have confirmed that:

  • I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions