Open rvbcldud opened 7 months ago
One additional detail: this task is a sub task. That may have something to do with it. In that case it seems similar to #611
Thank you for the issue @rvbcldud , I'm currently resolving this by using tod filter process
and having my filter include !subtask
. I need to filter out subtasks on actions under the project subcommand I think, need to test it a little more.
I tested this with subtasks and can confirm this is still a bug. Should be able to complete subtasks.
It looks like api calls to project tasks return/include subtasks even when completed, unless the parent task is completed.
I am reaching out to Todoist API support to investigate/test if this is intended as design.
If it is, I would recommend adding logic to filter out "is_completed" : true tasks to address this specific use case. I think this is logic that would have to be added after received, not as part of the query.
@alanvardy can you confirm the APIs being called for this particular function are these ones?
~~GET https://api.todoist.com/rest/v2/tasks?project_id=
Discovered I can use -v (verbose) for debugging, we're good here.
In test API calls, it looks like for tasks with subtasks, it looks like the number of uncompleted tasks + at least 1 subtasks (even if all are completed) is returned.
Checking off the parent task works correctly, however if a parent task is uncompleted, even if all the child tasks are completed, it will always return at least one child task (either with a "is_completed: true" status, or whatever the correct status is).
I believe the intention is that you can track tasks that are parent/subtasks based on parent_id (and filter based on that and is_completed), but I will look into this further.
Initial discussion with Todoist team is that this is likely an API bug, but still testing.. will update
Have reproduced the error and submitted to Todoist API team. API is inconsistent with official client.
When tasks are closed via the API, they are still returned in project queries (although with a status of is_closed: yes) When closed via the App, they are no longer returned.
Great job @stacksjb ! Thanks for looking into this
Todoist confirmed this is a bug and they will fix it at some point, but it hasn't yet been prioritized by their devs.
Marking as known bug on Todoist's side; will review/followup with them periodically
After I complete a task while processing a project, it shows up again to be processed:
I double checked to see that the task was successfully completed.
Is this the expected functionality? If not, let's look into this!
Maybe it is not checking the is_completed field?