Query parameters filter_by and filter_value are ignored #2346

Closed
opened 2024-06-04 14:46:23 +00:00 by ce72 · 1 comment
Contributor

Description

It looks like in the unstable version filtering tasks per query parameter does not work anymore.
In 0.23.0 stable the following statement yields only tasks with done=false. In the current version both false and true are delivered.

curl -H "Authorization: Bearer $TOKEN" "https://try.vikunja.io/api/v1/tasks/all?filter_by=done&filter_value=false"| jq '.[] | {id,title,done}'

The query seems to be valid according to https://try.vikunja.io/api/v1/docs#tag/task/paths/1tasks1all/get
This filter is used in vja to exclude done tasks by default.

Vikunja Version

unstable Version: v0.23.0+680-0bb4a5a2b2

Browser and version

curl

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

### Description It looks like in the unstable version filtering tasks per query parameter does not work anymore. In 0.23.0 stable the following statement yields only tasks with `done=false`. In the current version both `false` and `true` are delivered. ``` curl -H "Authorization: Bearer $TOKEN" "https://try.vikunja.io/api/v1/tasks/all?filter_by=done&filter_value=false"| jq '.[] | {id,title,done}' ``` The query seems to be valid according to https://try.vikunja.io/api/v1/docs#tag/task/paths/~1tasks~1all/get This filter is used in [vja](https://gitlab.com/ce72/vja) to exclude done tasks by default. ### Vikunja Version unstable Version: v0.23.0+680-0bb4a5a2b2 ### Browser and version curl ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
ce72 added the
kind/bug
label 2024-06-04 14:46:24 +00:00
Owner

This is intended behaviour. The old filter mechanism was replaced by a filter query syntax. It looks like the docs for the tasks endpoint were outdated, I've fixed that in 1843f1d0d8.

You can also check the docs for the tasks per project endpoint, they use the same logic under the hood: https://try.vikunja.io/api/v1/docs#tag/task/paths/1projects1%7Bid%7D1views1%7Bview%7D~1tasks/get

This is intended behaviour. The old filter mechanism was replaced by a filter query syntax. It looks like the docs for the tasks endpoint were outdated, I've fixed that in https://kolaente.dev/vikunja/vikunja/commit/1843f1d0d8f9603bccd2b9d35fbe038072837685. You can also check the docs for the tasks per project endpoint, they use the same logic under the hood: https://try.vikunja.io/api/v1/docs#tag/task/paths/~1projects~1%7Bid%7D~1views~1%7Bview%7D~1tasks/get
Sign in to join this conversation.
No Milestone
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vikunja/vikunja#2346
No description provided.