summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
Diffstat (limited to 'Omni')
-rw-r--r--Omni/Task.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs
index 1385a4b..0d8d6c8 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -339,6 +339,13 @@ move' args
statusStr <- getArgText args "status"
let isVerified = args `Cli.has` Cli.longOption "verified"
+ -- Handle complexity update
+ maybeComplexity <- case Cli.getArg args (Cli.longOption "complexity") of
+ Nothing -> pure Nothing
+ Just c -> case readMaybe c of
+ Just n | n >= 1 && n <= 5 -> pure (Just n)
+ _ -> panic <| "Invalid complexity: " <> T.pack c <> ". Use: 1-5"
+
-- Handle update dependencies
deps <- do
-- Parse --deps and --dep-type
@@ -375,6 +382,11 @@ move' args
updateTaskStatusWithActor tid newStatus deps Human
+ -- Update complexity if provided
+ case maybeComplexity of
+ Nothing -> pure ()
+ Just c -> void <| editTask tid (\t -> t {taskComplexity = Just c})
+
-- Record verification in activity log if verified
when (newStatus == Done && isVerified)
<| logActivity tid Completed (Just "{\"verified\":true}")