fix(task): only pick up done state from bucket change response

Spreading the full response task from the bucket change endpoint
overwrote fields like maxPermission with null, causing the action
buttons and edit icon to disappear after changing buckets.
This commit is contained in:
Lars de Ridder 2026-03-12 15:57:21 +01:00
parent 57a339b8c9
commit 0604f8d81a
1 changed files with 5 additions and 3 deletions

View File

@ -158,11 +158,13 @@ async function changeBucket(bucket: IBucket) {
kanbanStore.moveTaskToBucket(props.task, bucket.id)
// Use the task from the API response to pick up done state changes
// (moving to/from the done bucket toggles the done status)
// Only pick up done state from the response since moving to/from the
// done bucket can toggle it. Spreading the full response task would
// overwrite fields like maxPermission that are not part of this endpoint.
const updatedTask = {
...props.task,
...updatedTaskBucket.task,
done: updatedTaskBucket.task?.done ?? props.task.done,
doneAt: updatedTaskBucket.task?.doneAt ?? props.task.doneAt,
buckets: updatedBuckets,
bucketId: bucket.id,
}