- Fixed bug #932, which fixed change propagation for recurring tasks (thanks to
  Jennifer Cormier).
- Added unit tests, corrected some.
This commit is contained in:
Paul Beckingham 2012-02-20 17:25:31 -05:00
parent 259f39f2d2
commit 39998d5cc5
7 changed files with 138 additions and 4 deletions

View file

@ -110,7 +110,7 @@ int CmdModify::execute (std::string& output)
dependencyChainOnModify (before, *task);
context.footnote (onProjectChange (before, *task));
// Delete siblings.
// Task potentially has siblings - modify them.
if (task->has ("parent"))
{
std::vector <Task> siblings = context.tdb2.siblings (*task);
@ -131,6 +131,28 @@ int CmdModify::execute (std::string& output)
}
}
}
// Task potentially has child tasks - modify them.
else if (task->get ("status") == "recurring")
{
std::vector <Task> children = context.tdb2.children (*task);
if (children.size () &&
confirm (STRING_CMD_MODIFY_RECUR))
{
std::vector <Task>::iterator child;
for (child = children.begin (); child != children.end (); ++child)
{
Task alternate (*child);
modify_task_description_replace (*child, modifications);
updateRecurrenceMask (*child);
context.tdb2.modify (*child);
dependencyChainOnModify (alternate, *child);
context.footnote (onProjectChange (alternate, *child));
++count;
feedback_affected (STRING_CMD_MODIFY_TASK_R, *child);
}
}
}
}
else
{