Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sorting by dates #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JRasmusBm
Copy link

Why is the change needed?

That's very fundamental to how I use Todoist since I assign each task
with a timestamp and rely on them appearing ordered by date.

How is the need addressed?

  • Replace --priority flag with --sort (date|priority) for better
    extensibility
  • Label the --priority flag as deprecated

What side-effects could the change have?

  • Clutters the code base until the --priority flag can be removed.
    Still better than breaking changes. Can be removed after a reasonable
    migration time.

**Why** is the change needed?

That's very fundamental to how I use Todoist since I assign each task
with a timestamp and rely on them appearing ordered by date.

**How** is the need addressed?

-   Replace `--priority` flag with `--sort (date|priority)` for better
    extensibility
-   Label the `--priority` flag as deprecated

What **side-effects** could the change have?

-  Clutters the code base until the `--priority` flag can be removed.
   Still better than breaking changes. Can be removed after a reasonable
   migration time.
@@ -21,6 +21,9 @@ func traverseItems(item *todoist.Item, f func(item *todoist.Item, depth int), de
}
}

var byPriority int = 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these could be iota instead of manually numbered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants