mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug 449 - Inconsistent wait: attribute results
- Fixed bug #449, so the wait: attribute can be applied to a task at any time, not just on add. - While searching for problems with the waiting status, noticed that importCSV doesn't appear to set any tasks to pending status.
This commit is contained in:
parent
4d266412ee
commit
2ef30b1183
4 changed files with 30 additions and 6 deletions
|
@ -69,8 +69,12 @@ int handleAdd (std::string &outs)
|
|||
context.task.setStatus (Task::recurring);
|
||||
context.task.set ("mask", "");
|
||||
}
|
||||
|
||||
// Tasks with a wait: date get a special status.
|
||||
else if (context.task.has ("wait"))
|
||||
context.task.setStatus (Task::waiting);
|
||||
|
||||
// By default, tasks are pending.
|
||||
else
|
||||
context.task.setStatus (Task::pending);
|
||||
|
||||
|
@ -1335,7 +1339,8 @@ int handleDone (std::string &outs)
|
|||
bool nagged = false;
|
||||
foreach (task, tasks)
|
||||
{
|
||||
if ((task->getStatus () == Task::pending) || (task->getStatus () == Task::waiting))
|
||||
if (task->getStatus () == Task::pending ||
|
||||
task->getStatus () == Task::waiting)
|
||||
{
|
||||
Task before (*task);
|
||||
|
||||
|
@ -2298,9 +2303,15 @@ int deltaAttributes (Task& task)
|
|||
if (att->second.name () == "wait")
|
||||
{
|
||||
if (att->second.value () == "")
|
||||
{
|
||||
task.remove (att->first);
|
||||
task.setStatus (Task::pending);
|
||||
}
|
||||
else
|
||||
{
|
||||
task.set (att->first, att->second.value ());
|
||||
task.setStatus (Task::waiting);
|
||||
}
|
||||
}
|
||||
|
||||
// Modifying dependencies requires adding/removing uuids.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue