fix(draft): set promoted task status to defaultStatus#625
Open
SAY-5 wants to merge 1 commit intoMrLesk:mainfrom
Open
fix(draft): set promoted task status to defaultStatus#625SAY-5 wants to merge 1 commit intoMrLesk:mainfrom
SAY-5 wants to merge 1 commit intoMrLesk:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
backlog initwith default statuses (To Do,In Progress,Done).Patch
In
src/file-system/operations.tspromoteDraft, set the promoted task'sstatustoconfig.defaultStatus(falling back toFALLBACK_STATUS = "To Do", the same default used incore/backlog.tsfor newly-created tasks). The status is set on the in-memorypromotedTaskbeforesaveTask, 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:typesclean.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).