diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 19:41:15 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 19:41:15 -0500 |
| commit | 91d3e6aa499c3207a84f79683b86f2fbe01dee52 (patch) | |
| tree | 5bb6de6c7712b61eda4faf96b02ed2d2b6686b4b /Omni/Task.hs | |
| parent | 010af153fa43f754d8975fd64c172ac17c523140 (diff) | |
| parent | 1e34a47803b10513443ef836aad88c0087c67e5d (diff) | |
task: complete t-1o2c9vazf64 (Merge)
Amp-Thread-ID:
https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'Omni/Task.hs')
| -rw-r--r-- | Omni/Task.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs index 82449db..653e5fe 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -78,7 +78,7 @@ Commands: Options: -h --help Show this help --title=<title> Task title - --type=<type> Task type: epic or task + --type=<type> Task type: epic, task, or human (default: task) --parent=<id> Parent epic ID --priority=<p> Priority: 0-4 (0=critical, 4=backlog, default: 2) --status=<status> Filter by status: open, in-progress, review, approved, done @@ -127,7 +127,8 @@ move args Nothing -> pure WorkTask Just "epic" -> pure Epic Just "task" -> pure WorkTask - Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic or task" + Just "human" -> pure HumanTask + Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic, task, or human" parent <- case Cli.getArg args (Cli.longOption "parent") of Nothing -> pure Nothing Just p -> pure <| Just (T.pack p) @@ -247,6 +248,7 @@ 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 @@ -405,6 +407,13 @@ 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 + taskType task Test.@?= HumanTask, + Test.unit "ready tasks exclude human tasks" <| do + task <- createTask "Human Task" HumanTask Nothing Nothing P2 [] Nothing + ready <- getReadyTasks + (taskId task `notElem` map taskId ready) Test.@?= True, Test.unit "can create task with description" <| do task <- createTask "Test task" WorkTask Nothing Nothing P2 [] (Just "My description") taskDescription task Test.@?= Just "My description", |
