Fix ClickUp view filter payload formatting

Closed
LO
4mo ago
+112-2

Summary

  • format view filters with the ClickUp API field names op and values
  • map supported filter operators to their API values and preserve falsy scalar values
  • encode set/unset filters with the documented [null] values payload
  • add regression coverage for both view creation and filter updates

Fixes #29

Validation

  • npx jest --config packages/core/jest.config.js --runInBand --coverage=false - passed 11 suites and 180 tests
  • npm run build --workspace=packages/core - passed
  • npx eslint packages/core/src/clickup-client/views-enhanced.ts packages/core/src/tests/views-filter-payload.test.ts - passed with one pre-existing max-line-length warning on views-enhanced.ts:2
  • git diff --check - passed
  • root npm ci reached the workspace prepare build and failed on existing TypeScript errors in packages/intelligence; core dependencies were installed separately for the checks above, without modifying the lockfile

Notes

  • no dependencies or lockfiles changed
  • the change only affects outgoing view filter payload formatting
  • existing callers can continue using the current schema operator names and scalar or array values

Summary by cubic

Fixes ClickUp view filter payloads to match the API and prevent rejected requests. We now send op and values, map operators, preserve falsy scalars, and encode set/unset as [null].

  • Bug Fixes
    • Use API field keys (op, values) and map operators: EQ, NOT, GT, LT, GTE, LTE, ANY, NOT ANY, IS SET, IS NOT SET.
    • Normalize values: always send a values array; preserve falsy scalars; support arrays; encode set/unset as [null].
    • Add regression tests for view creation and filter updates.