Task: Only consider pending tasks as waiting
This commit is contained in:
10
src/Task.cpp
10
src/Task.cpp
@@ -578,12 +578,14 @@ bool Task::is_overdue () const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Task is considered waiting if it's pending and the wait attribute is set as
|
||||||
|
// future datetime value.
|
||||||
|
// While this is not consistent with other attribute-based virtual tags, such
|
||||||
|
// as +BLOCKED, it is more backwards compatible with how +WAITING virtual tag
|
||||||
|
// behaved in the past, when waiting had a dedicated status value.
|
||||||
bool Task::is_waiting () const
|
bool Task::is_waiting () const
|
||||||
{
|
{
|
||||||
// note that is_waiting can return true for tasks in an actual status other
|
if (has ("wait") && get ("status") == "pending")
|
||||||
// than pending; in this case +WAITING will be set but the status will not be
|
|
||||||
// "waiting"
|
|
||||||
if (has ("wait"))
|
|
||||||
{
|
{
|
||||||
Datetime now;
|
Datetime now;
|
||||||
Datetime wait (get_date ("wait"));
|
Datetime wait (get_date ("wait"));
|
||||||
|
|||||||
Reference in New Issue
Block a user