Skip to content

Conversation

@harryadel
Copy link
Contributor

The click handler called setDone() without await then immediately
called Popup.back(2), destroying the popup template while the async
operation was still running. This caused unhandled promise rejections
and made errors invisible to the user.
Card.copy() mutated `this` directly (boardId, labelIds, customFields,
etc.), corrupting the cached source card object and causing intermittent
failures on repeated copy operations. Now works on a shallow copy.

Also normalizes customFields to [] when it's not an array (e.g. legacy
{} data in the database), preventing "Custom fields must be an array"
schema validation errors on both copy and move operations.
After a cross-board copy, ReactiveCache.getCard(newCardId) can return
null if the publication update hasn't reached the client yet. The card
is already created with a valid sort position server-side, so the
client-side repositioning is safely skippable.
@harryadel harryadel marked this pull request as ready for review February 5, 2026 00:43
@xet7 xet7 merged commit 404dd07 into wekan:main Feb 5, 2026
5 checks passed
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.

2 participants