Skip to content

Fix GetListViews dropping grouped Dataview filters - #3230

Open
caddydove wants to merge 1 commit into
anyproto:developfrom
caddydove:fix/3228-get-list-views-nested-filters
Open

Fix GetListViews dropping grouped Dataview filters#3230
caddydove wants to merge 1 commit into
anyproto:developfrom
caddydove:fix/3228-get-list-views-nested-filters

Conversation

@caddydove

Copy link
Copy Markdown

What this PR does

Fixes #3228.

GET /v1/spaces/{space_id}/lists/{list_id}/views silently dropped grouped Dataview filters. The filter loop skipped any filter with Condition == None (BlockContentDataviewFilter_None) via continue, never looking at NestedFilters — so filters configured as groups (AND/OR) disappeared from the response.

Changes

  • Flatten grouped filters into their nested conditions so they are returned in the API's existing list-of-leaf-filters format.
  • Added a regression test covering a filter nested inside a group.

Test plan

  • go test ./core/api/service/ -run TestListService_GetListViews -count=1
  • go test ./core/api/... -count=1
  • go vet ./core/api/service/

The filter loop skipped any filter with Condition None without inspecting
NestedFilters, silently dropping grouped (AND/OR) filters from the views
response. Flatten grouped filters into their nested conditions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetListViews drops grouped Dataview filters

1 participant