mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancement - wait status
- Supports the new Task::waiting status. - Supports: task <id> wait:<date> - Supports: task <id> wait: - Supports: task waiting
This commit is contained in:
parent
40bde9e765
commit
329a78039a
12 changed files with 131 additions and 16 deletions
14
src/TDB.cpp
14
src/TDB.cpp
|
@ -168,7 +168,9 @@ int TDB::load (std::vector <Task>& tasks, Filter& filter)
|
|||
{
|
||||
++numberStatusClauses;
|
||||
|
||||
if (att->mod () == "" && att->value () == "pending")
|
||||
if (att->mod () == "" &&
|
||||
(att->value () == "pending" ||
|
||||
att->value () == "waiting"))
|
||||
++numberSimpleStatusClauses;
|
||||
}
|
||||
}
|
||||
|
@ -391,6 +393,7 @@ void TDB::upgrade ()
|
|||
int TDB::gc ()
|
||||
{
|
||||
int count = 0;
|
||||
Date now;
|
||||
|
||||
// Set up a second TDB.
|
||||
Filter filter;
|
||||
|
@ -417,6 +420,15 @@ int TDB::gc ()
|
|||
completed.push_back (*task);
|
||||
++count;
|
||||
}
|
||||
else if (s == Task::waiting)
|
||||
{
|
||||
// Wake up tasks that are waiting.
|
||||
Date wait_date (::atoi (task->get ("wait").c_str ()));
|
||||
if (now > wait_date)
|
||||
task->setStatus (Task::pending);
|
||||
|
||||
still_pending.push_back (*task);
|
||||
}
|
||||
else
|
||||
still_pending.push_back (*task);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue