mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Card.copy()'s cross-board label-remap did oldBoard.labels.filter(...) and filterCopiedLabelIds(newBoard.labels, ...) without guarding a missing labels array. Boards created via the REST API (POST /api/boards) have no labels array, so copying a card to/from such a board — or copying the board itself (which copies its cards cross-board) — threw "Cannot read properties of undefined (reading 'filter')" and returned HTTP 500. Both lookups now fall back to []. Also fixes the subtask cross-board-copy test seed (real cards always have a userId; the seed lacked one, hitting "User ID is required in cards insertAsync"). Validated locally: full tests/playwright/specs/17-rest-api.e2e.js passes (24/24, chromium) against a running dev server, and npm run test:unit:node passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>