summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
Diffstat (limited to 'Omni')
-rw-r--r--Omni/Task.hs4
-rw-r--r--Omni/Task/Core.hs3
2 files changed, 6 insertions, 1 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs
index 12842db..e4294dc 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -432,6 +432,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 3de42b2..a9f6743 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