mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug - import.yaml
- Fixed bug in import for YAML and TODO that failed to recognize that a task was completed or deleted, and consequently set a Task::pending status. - Enhanced unit tests to verify this.
This commit is contained in:
parent
41f2520094
commit
5b8dbd8ff1
3 changed files with 66 additions and 10 deletions
15
src/TDB.cpp
15
src/TDB.cpp
|
@ -457,9 +457,18 @@ const std::vector <Task>& TDB::getAllModified ()
|
|||
// Note: mLocations[0] is where all tasks are written.
|
||||
void TDB::add (const Task& task)
|
||||
{
|
||||
mNew.push_back (task);
|
||||
mI2U[task.id] = task.get ("uuid");
|
||||
mU2I[task.get ("uuid")] = task.id;
|
||||
Task t (task);
|
||||
if (task.get ("uuid") == "")
|
||||
{
|
||||
std::string unique = ::uuid ();
|
||||
t.set ("uuid", unique);
|
||||
}
|
||||
else
|
||||
t.set ("uuid", task.get ("uuid"));
|
||||
|
||||
mNew.push_back (t);
|
||||
mI2U[task.id] = t.get ("uuid");
|
||||
mU2I[task.get ("uuid")] = t.id;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue