Skip to content

getTasks passing a filter with the NOT(!) operator throws a ValidationError #245

@thales-fukuda

Description

@thales-fukuda

Bug description

After calling getTasks and passing a filter with the ! operator, the API response does not include the duration property causing the SDK to throw a ValidationError.

I tested doing the request manually on Postman and indeed the duration field was missing. I also tried with a brand new account and the problem persisted.

It looks like it only happens when using the !, but I could be wrong.

If it is the expected behavior for the API, the duration field on the Task entity should be optional to stop the error.

Expected behaviour

The request should not throw an error and it should include duration in the response.

Is reproducible

Yes

To reproduce

const excludePriorityOne = async () => {
	const res = await api.getTasks({ filter: `!p1` })
	console.log(res)
}

excludePriorityOne()

Version information:

  • Package version: 3.0.0
  • Node: 18.18.0

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