Skip to content

GetTasks endpoint does not work with ids parameter #131

@Tobias-Braun

Description

@Tobias-Braun

Bug description

GetTasks endpoint does not work with ids parameter

Expected behaviour

When calling todoistApi.getTasks({ids: [1, 2]}) I should get only the tasks with id 1 and 2. (Of course assuming 1 and 2 are valid ids for my account).
However, I get all active tasks, the parameter is ignored.

Is reproducible

Yes

To reproduce

Use the getTasks() call with one of your accounts and valid ids.

How to Fix

Your getTasks() definition in typescript, specifically the GetTaskArgs interface, expects ids to be of type number[]. However, your endpoint expects the ids parameter as a string value with comma-separated ids. This clashes and the parameter is therefore ignored.
You can solve the issue by either calling toString() on ids or by changing the type definition of the sdk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions