mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Task Validation
- Fixed validation bug whereby recurring child tasks inherited the parent status ("recurring") instead of the expected "pending". - Modified 'add' command to code duplicated in Task::validate. - Cleaned up associated bug.period.t unit test.
This commit is contained in:
parent
8e34a02811
commit
b09351c517
6 changed files with 24 additions and 32 deletions
|
@ -51,16 +51,9 @@ int CmdAdd::execute (std::string& output)
|
|||
{
|
||||
int rc = 0;
|
||||
|
||||
// Every task needs a UUID.
|
||||
Task task;
|
||||
task.set ("uuid", uuid ());
|
||||
|
||||
// Apply the command line modifications to the new task.
|
||||
Task task;
|
||||
modify_task_description_replace (task, context.a3.extract_modifications ());
|
||||
apply_defaults (task);
|
||||
|
||||
// Only valid tasks can be added.
|
||||
task.validate ();
|
||||
context.tdb2.add (task);
|
||||
|
||||
// TODO This should be a call in to feedback.cpp.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue