mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task: Only consider pending tasks as waiting
This commit is contained in:
parent
3b37dc2480
commit
4287b33796
1 changed files with 6 additions and 4 deletions
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"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue