-
Notifications
You must be signed in to change notification settings - Fork 11
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
Named filters #592
Comments
Thank you for the bug report! I'll investigate this as soon as possible. |
This really helped when I was figuring out how to find all of the lists associated with a specific filter. I think specifying "FILTER_STRING" is a good solution. However, on the Todoist website they call they "filter queries" which might be a bit more descriptive. Let me know what you think! I would also love to see the ability to print out the tasks in my own created filters. Looking forward to that feature and would love to help where I can. |
Hmmm... I like
Which issue is this? Maybe I can prioritize it 😄 |
Awesome. Glad I could help. I would also say that since you would have both "PROJECT NAME" and "FILTER_QUERY" in the help message, maybe make a design decision on whether or not to use underscores. I just looked and couldn't find the issue. It seems like this is the only one that mentions it. This issue is related but misunderstands the current functionality of filters in tod (only receives queries, not self-created filters). We could create a new issue that is more obvious that it is a feature that needs an implementation |
I've wanted to add filter support too (#374 was another issue where I'd like to have it). However, I'm not sure the API supports predefined filters currently. My understanding of the "get tasks" API is that it only supports defined (provided with the query) filters. I've reached out to my API contacts to confirm. It might require multiple queries to get filters, then execute the get with the filter query. |
That would be a hindrance for sure. Let us know what you end up hearing! |
I've confirmed with Todoist support the API only supports querying by filter query, not by Filter ID. So implementing this would require that Query filters be stored locally, then query by those. I wonder if a viable method might be to just add cli parameters for "Get filter" and "set filter", then just keep a global "Current filter" and set/add it to all API requests? I prefer to work through one filter at a time. In either case, if we don't want to have to explicitly store the filter, we'd have to query it each time. So the only way to implement it as you describe would be to store locally and add logic to allow selecting a filter. My use case is to be able to execute "Tod task next" with an existing filter. |
I see a couple ways this could be implemented, but looking for suggestions/ideas:
|
Thank you! I have an idea that kinda a mish-mash of the above, I would make a new subcommand called i.e. Add a new named filter
List named filters
Remove named filters
And that the named filters can be used anywhere that the filter string is. What do you guys think? |
Hmm - I like the above suggestion - how would you differentiate between named filters and filter strings? Two other concerns:
|
The following API returns a user's filters (which we could then make some sort of import/setup/update method for): curl --request POST 'https://todoist.com/api/v9/sync?sync_token=*&resource_types=[%22filters%22]' --header 'Authorization: Bearer $TOKEN' |
This ties into one of my past workflows: I have a series of filters that I have sorted into a daily list, so each day I start on list 1 (morning routine), then list 2 (daily review/planning), then 3 (deep work, coding, etc), then 4 (phone calls, personal items, errands), then 5 (home context), etc. The filters are inclusive of exactly the tasks I'm looking for, and don't return anything I haven't prioritized or labeled for work or that is due in the future, then sorted based on due date. (a very common filter is & (no due date | due | overdue) I have an excel spreadsheet list of each defined filter (filters 1-7) that I work through, depending on the context and day. In the past I had these filters saved as bookmarks and used Flowist (https://github.com/selfire1/todoist-focus-mode) to work through them, but now I have them saved in a config and use an app I threw together (to help me understand this one better 😆 (https://github.com/stacksjb/CLI_Shell_Command_Menu/) that I launch then that acts as a front layer to execute saved Tod filter and get next task commands. I'd love be able to include named filters so I don't have to maintain them in multiple places - but this is lower priority since I can just duplicate them for the time being. |
When I add filters to
task list
(either interactively or as a-f
option) I sometimes get errors:I've verified the filter names. I've tried quoting in the command line, as well renaming them.
The text was updated successfully, but these errors were encountered: