diff --git a/plugins/tracker-resources/src/components/workflow/Statuses.svelte b/plugins/tracker-resources/src/components/workflow/Statuses.svelte index 851ccb88eb..30a90c021f 100644 --- a/plugins/tracker-resources/src/components/workflow/Statuses.svelte +++ b/plugins/tracker-resources/src/components/workflow/Statuses.svelte @@ -179,16 +179,12 @@ } function handleDragOver (ev: DragEvent, status: IssueStatus) { - if (draggingStatus?.category === status.category) { - hoveringStatus = status - ev.preventDefault() - } else { - hoveringStatus = null - } + hoveringStatus = status + ev.preventDefault() } async function handleDrop (toItem: IssueStatus) { - if (draggingStatus != null && draggingStatus?._id !== toItem._id && draggingStatus?.category === toItem.category) { + if (draggingStatus != null && draggingStatus?._id !== toItem._id) { const fromIndex = getStatusIndex(draggingStatus) const toIndex = getStatusIndex(toItem) const [prev, next] = [ @@ -197,7 +193,9 @@ ] isSaving = true - await client.update(draggingStatus, { rank: calcRank(prev, next) }) + let newCategory = {} + if (draggingStatus?.category !== toItem.category) newCategory = { category: toItem.category } + await client.update(draggingStatus, { rank: calcRank(prev, next), ...newCategory }) isSaving = false }