summaryrefslogtreecommitdiff
path: root/Omni/Task.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Task.hs')
-rw-r--r--Omni/Task.hs24
1 files changed, 11 insertions, 13 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs
index ce26f41..1385a4b 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -85,11 +85,11 @@ Commands:
Options:
-h --help Show this help
--title=<title> Task title
- --type=<type> Task type: epic, task, or human (default: task)
+ --type=<type> Task type: epic or task (default: task)
--parent=<id> Parent epic ID
--priority=<p> Priority: 0-4 (0=critical, 4=backlog, default: 2)
--complexity=<c> Complexity: 1-5 for model selection (1=trivial, 5=expert)
- --status=<status> Filter by status: draft, open, in-progress, review, approved, done
+ --status=<status> Filter by status: draft, open, in-progress, review, approved, done, needs-help
--epic=<id> Filter stats by epic (recursive)
--deps=<ids> Comma-separated list of dependency IDs
--dep-type=<type> Dependency type: blocks, discovered-from, parent-child, related
@@ -109,7 +109,7 @@ Options:
Arguments:
<title> Task title
<id> Task ID
- <status> Task status (draft, open, in-progress, review, approved, done)
+ <status> Task status (draft, open, in-progress, review, approved, done, needs-help)
<message> Comment message
<file> JSONL file to import
|]
@@ -147,8 +147,7 @@ move' args
Nothing -> pure WorkTask
Just "epic" -> pure Epic
Just "task" -> pure WorkTask
- Just "human" -> pure HumanTask
- Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic, task, or human"
+ Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic or task"
parent <- case Cli.getArg args (Cli.longOption "parent") of
Nothing -> pure Nothing
Just p -> pure <| Just (T.pack p)
@@ -295,7 +294,6 @@ move' args
Nothing -> pure Nothing
Just "epic" -> pure <| Just Epic
Just "task" -> pure <| Just WorkTask
- Just "human" -> pure <| Just HumanTask
Just other -> panic <| "Invalid task type: " <> T.pack other
maybeParent <- case Cli.getArg args (Cli.longOption "parent") of
Nothing -> pure Nothing
@@ -308,7 +306,8 @@ move' args
Just "review" -> pure <| Just Review
Just "approved" -> pure <| Just Approved
Just "done" -> pure <| Just Done
- Just other -> panic <| "Invalid status: " <> T.pack other <> ". Use: draft, open, in-progress, review, approved, or done"
+ Just "needs-help" -> pure <| Just NeedsHelp
+ Just other -> panic <| "Invalid status: " <> T.pack other <> ". Use: draft, open, in-progress, review, approved, done, or needs-help"
maybeNamespace <- case Cli.getArg args (Cli.longOption "namespace") of
Nothing -> pure Nothing
Just ns -> do
@@ -362,7 +361,8 @@ move' args
"review" -> Review
"approved" -> Approved
"done" -> Done
- _ -> panic "Invalid status. Use: draft, open, in-progress, review, approved, or done"
+ "needs-help" -> NeedsHelp
+ _ -> panic "Invalid status. Use: draft, open, in-progress, review, approved, done, or needs-help"
-- Show verification checklist warning when marking Done without --verified
when (newStatus == Done && not isVerified && not (isJsonMode args)) <| do
@@ -620,11 +620,9 @@ unitTests =
taskStatus task Test.@?= Open
taskPriority task Test.@?= P2
null (taskDependencies task) Test.@?= True,
- Test.unit "can create human task" <| do
- task <- createTask "Human Task" HumanTask Nothing Nothing P2 Nothing [] "Human task description"
- taskType task Test.@?= HumanTask,
- Test.unit "ready tasks exclude human tasks" <| do
- task <- createTask "Human Task" HumanTask Nothing Nothing P2 Nothing [] "Human task"
+ Test.unit "ready tasks exclude NeedsHelp tasks" <| do
+ task <- createTask "Needs Help Task" WorkTask Nothing Nothing P2 Nothing [] "Task needing help"
+ updateTaskStatus (taskId task) NeedsHelp []
ready <- getReadyTasks
(taskId task `notElem` map taskId ready) Test.@?= True,
Test.unit "ready tasks exclude draft tasks" <| do