diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-22 06:48:34 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-22 06:48:34 -0500 |
| commit | efbb7cf298585cfff5336d048e7d1af2dd94d560 (patch) | |
| tree | a4398fc679bdb6a47cd48359bdff10b104233c1f /Omni/Task.hs | |
| parent | 242903ce18b3a85f45db1888f8944ab036d5df23 (diff) | |
| parent | 92b18fdad7feefbdf750f918472ba1208540094c (diff) | |
Merge branch 'live' into task/t-rWcmRMaWX.4
Diffstat (limited to 'Omni/Task.hs')
| -rw-r--r-- | Omni/Task.hs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs index 36b318b..5008dd2 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -44,7 +44,7 @@ Usage: task list [options] task ready [--json] task show <id> [--json] - task update <id> <status> [--json] + task update <id> <status> [options] task deps <id> [--json] task tree [<id>] [--json] task progress <id> [--json] @@ -214,13 +214,30 @@ move args | args `Cli.has` Cli.command "update" = do tid <- getArgText args "id" statusStr <- getArgText args "status" + + -- Handle update dependencies + deps <- do + -- Parse --deps and --dep-type + ids <- case Cli.getArg args (Cli.longOption "deps") of + Nothing -> pure [] + Just depStr -> pure <| T.splitOn "," (T.pack depStr) + dtype <- case Cli.getArg args (Cli.longOption "dep-type") of + Nothing -> pure Blocks + Just "blocks" -> pure Blocks + Just "discovered-from" -> pure DiscoveredFrom + Just "parent-child" -> pure ParentChild + Just "related" -> pure Related + Just other -> panic <| "Invalid dependency type: " <> T.pack other <> ". Use: blocks, discovered-from, parent-child, or related" + pure (map (\d -> Dependency {depId = d, depType = dtype}) ids) + let newStatus = case statusStr of "open" -> Open "in-progress" -> InProgress "review" -> Review "done" -> Done _ -> panic "Invalid status. Use: open, in-progress, review, or done" - updateTaskStatus tid newStatus + + updateTaskStatus tid newStatus deps if isJsonMode args then outputSuccess <| "Updated task " <> tid else do |
