From 94d4a364af40ca6255b3dd9667c8e966cd61929f Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Fri, 30 Sep 2022 06:49:20 -0500 Subject: [PATCH] META will be stuck if single WAIT Active if all but waits are active --- lisp/org-project/opr-projects.el | 4 ++-- tests/files/meta-active-base.org | 5 +++++ tests/files/meta-stuck-base.org | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/org-project/opr-projects.el b/lisp/org-project/opr-projects.el index b0aad3e..6dc4bd1 100644 --- a/lisp/org-project/opr-projects.el +++ b/lisp/org-project/opr-projects.el @@ -50,8 +50,8 @@ (not (olc/any-todo-children? t)) ;; All todo children are done? Stuck! (not (olc/any-todo-children? - (not (eq 'done - (cdr (opr/get-type-and-state))))))) + (not (member (cdr (opr/get-type-and-state)) + '(done wait)))))) 'stuck 'active))) diff --git a/tests/files/meta-active-base.org b/tests/files/meta-active-base.org index 06445c9..4a3a8ad 100644 --- a/tests/files/meta-active-base.org +++ b/tests/files/meta-active-base.org @@ -12,3 +12,8 @@ SCHEDULED: <1997-01-01 Wed> ** WAIT for this to happen SCHEDULED: <1970-01-01 Thu> - State "WAIT" from [2022-09-29 Thu 16:53] +* META should be active, as long as one componenent is active, since WAIT is "invisible" +** WAIT for this thing +SCHEDULED: <2037-12-31 Thu> +** TASK Active task +SCHEDULED: <1970-01-01 Thu> diff --git a/tests/files/meta-stuck-base.org b/tests/files/meta-stuck-base.org index 8a35ba3..edeb00a 100644 --- a/tests/files/meta-stuck-base.org +++ b/tests/files/meta-stuck-base.org @@ -13,3 +13,6 @@ * META should be stuck even if there are deadlined dones ** DONE Deadlined done task DEADLINE: <2021-06-21 Mon> +* META should be stuck if there is one single WAIT task that is scheduled, and no other tasks +** WAIT for this thing +SCHEDULED: <2037-12-31 Thu>