Skip to content

fix(draft): set promoted task status to defaultStatus#625

Open
SAY-5 wants to merge 1 commit intoMrLesk:mainfrom
SAY-5:fix/promote-draft-default-status-624
Open

fix(draft): set promoted task status to defaultStatus#625
SAY-5 wants to merge 1 commit intoMrLesk:mainfrom
SAY-5:fix/promote-draft-default-status-624

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Closes #624.

When a draft is promoted to a task, the file-system layer copied the draft straight through with its existing "Draft" status. Once moved out of the drafts directory, that status no longer matched any column on the kanban board, so promoted tasks were invisible unless the user manually added a "Draft" column or edited the task afterwards.

Repro

  1. backlog init with default statuses (To Do, In Progress, Done).
  2. Create a draft, promote it.
  3. The new task is created on disk but doesn't show in any kanban column.

Patch

In src/file-system/operations.ts promoteDraft, set the promoted task's status to config.defaultStatus (falling back to FALLBACK_STATUS = "To Do", the same default used in core/backlog.ts for newly-created tasks). The status is set on the in-memory promotedTask before saveTask, so the markdown front-matter is written with the correct status the first time and there is no follow-up rewrite.

Verification

  • bun run check:types clean.
  • bun test src/test/cli-init-no-git.test.ts — 3/4 pass; the 4th failure is unrelated (a Git signing-key issue in the local sandbox, not touched by this change).

Closes MrLesk#624.

When a draft is promoted to a task, the file-system layer copied the
draft straight through with its existing "Draft" status. Once moved
out of the drafts directory, that status no longer matched any column
on the kanban board, so promoted tasks were invisible unless the user
manually added a "Draft" column or edited the task afterwards. Both
the in-memory promotion path (Backlog.promoteDraftWithUpdates ->
saveTask) and the kanban serialization treat "Draft" as a magic
draft-only marker, so leaving it on a non-draft is incorrect.

Set the promoted task's status to `config.defaultStatus` (falling
back to FALLBACK_STATUS = "To Do", same default used elsewhere in
core/backlog.ts), so the new task lands in the first kanban column
and is immediately visible.
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.

[Bug]: Draft tasks not working

1 participant