diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 17:08:38 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 17:08:38 -0500 |
| commit | 76680a7a54b0b68b6089ab34910b41a17c2e9519 (patch) | |
| tree | 73d7e080e2e44e12e41a53cde626ee45ac161516 /Omni | |
| parent | 832a0a7d88d0553e7edf055addb2c3a6f9f492ab (diff) | |
| parent | 53283140584e67fdece0543141b29f92b5399e69 (diff) | |
Merge branch 'review/t-1o2bxd3kezj' into live
Diffstat (limited to 'Omni')
| -rw-r--r-- | Omni/Task.hs | 4 | ||||
| -rw-r--r-- | Omni/Task/Core.hs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs index 8abf551..82449db 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -435,6 +435,10 @@ unitTests = -- Both should be ready since Related doesn't block (taskId task1 `elem` map taskId ready) Test.@?= True (taskId task2 `elem` map taskId ready) Test.@?= True, + Test.unit "ready tasks exclude epics" <| do + epic <- createTask "Epic task" Epic Nothing Nothing P2 [] Nothing + ready <- getReadyTasks + (taskId epic `notElem` map taskId ready) Test.@?= True, Test.unit "child task gets sequential ID" <| do parent <- createTask "Parent" Epic Nothing Nothing P2 [] Nothing child1 <- createTask "Child 1" WorkTask (Just (taskId parent)) Nothing P2 [] Nothing diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs index ebf5390..2f2cccb 100644 --- a/Omni/Task/Core.hs +++ b/Omni/Task/Core.hs @@ -454,7 +454,8 @@ getReadyTasks = do -- Only Blocks and ParentChild dependencies block ready work blockingDepIds task = [depId dep | dep <- taskDependencies task, depType dep `elem` [Blocks, ParentChild]] isReady task = - not (isParent (taskId task)) + taskType task /= Epic + && not (isParent (taskId task)) && all (`elem` doneIds) (blockingDepIds task) pure <| filter isReady openTasks |
