TW-1454: Redundant dependency should not stop modification

This commit is contained in:
Wilhelm Schuermann 2015-06-05 23:57:48 +02:00
parent e4b9c1f01e
commit 5105bd05f9
2 changed files with 10 additions and 2 deletions

View file

@ -4,6 +4,8 @@
Harlan).
- TW-1440 "task import" from STDIN (thanks to Renato Alves).
- TW-1432 start/stop can be issued on completed tasks (thanks to Renato Alves).
- TW-1454 Redundant dependency should not stop modification (thanks to Tomas
Babej).
- TW-1572 Better urgency inheritance (thanks to Jens Erat).
- Prevent potential task duplication during import for non-pending tasks.
- Show the active context in "context list", if any is active.

View file

@ -980,7 +980,10 @@ void Task::addDependency (int id)
std::string depends = get ("depends");
if (depends.find (uuid) != std::string::npos)
throw format (STRING_TASK_DEPEND_DUP, this->id, id);
{
context.footnote (format (STRING_TASK_DEPEND_DUP, this->id, id));
return;
}
addDependency(uuid);
}
@ -999,7 +1002,10 @@ void Task::addDependency (const std::string& uuid)
if (depends.find (uuid) == std::string::npos)
set ("depends", depends + "," + uuid);
else
throw format (STRING_TASK_DEPEND_DUP, this->get ("uuid"), uuid);
{
context.footnote (format (STRING_TASK_DEPEND_DUP, this->get ("uuid"), uuid));
return;
}
}
else
set ("depends", uuid);