mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
Dependencies - log
- Prevent completed tasks, via the log command, from being marked as dependent.
This commit is contained in:
parent
98cef98111
commit
27a56d15db
1 changed files with 4 additions and 2 deletions
|
@ -150,6 +150,10 @@ int handleLog (std::string &outs)
|
||||||
if (context.task.has ("wait"))
|
if (context.task.has ("wait"))
|
||||||
throw std::string ("You cannot log waiting tasks.");
|
throw std::string ("You cannot log waiting tasks.");
|
||||||
|
|
||||||
|
// It makes no sense to add dependencies to an already-completed task.
|
||||||
|
if (context.task.get ("depends") != "")
|
||||||
|
throw std::string ("You cannot specify dependencies on a completed task.");
|
||||||
|
|
||||||
// Override with default.project, if not specified.
|
// Override with default.project, if not specified.
|
||||||
if (context.task.get ("project") == "")
|
if (context.task.get ("project") == "")
|
||||||
context.task.set ("project", context.config.get ("default.project"));
|
context.task.set ("project", context.config.get ("default.project"));
|
||||||
|
@ -166,8 +170,6 @@ int handleLog (std::string &outs)
|
||||||
foreach (tag, context.tagAdditions)
|
foreach (tag, context.tagAdditions)
|
||||||
context.task.addTag (*tag);
|
context.task.addTag (*tag);
|
||||||
|
|
||||||
// TODO Resolve dependencies.
|
|
||||||
|
|
||||||
// Only valid tasks can be added.
|
// Only valid tasks can be added.
|
||||||
context.task.validate ();
|
context.task.validate ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue