mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-30 04:23:24 +02:00
TW-1293, TW-1294
- TW-1293 Modifying or deleting a child task does not propagate if there are no siblings (thanks to darkfeline). - TW-1294 Modifying a child task does not propagate to parent (thanks to darkfeline).
This commit is contained in:
parent
e3d7479211
commit
68ceea953a
6 changed files with 20 additions and 15 deletions
|
@ -117,10 +117,9 @@ int CmdModify::execute (std::string& output)
|
|||
// Task potentially has siblings - modify them.
|
||||
if (task->has ("parent"))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
if (siblings.size () &&
|
||||
confirm (STRING_CMD_MODIFY_RECUR))
|
||||
if (confirm (STRING_CMD_MODIFY_RECUR))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
std::vector <Task>::iterator sibling;
|
||||
for (sibling = siblings.begin (); sibling != siblings.end (); ++sibling)
|
||||
{
|
||||
|
@ -135,6 +134,12 @@ int CmdModify::execute (std::string& output)
|
|||
if (context.verbose ("project"))
|
||||
projectChanges[sibling->get ("project")] = onProjectChange (alternate, *sibling);
|
||||
}
|
||||
|
||||
// Modify the parent
|
||||
Task parent;
|
||||
context.tdb2.get (task->get ("parent"), parent);
|
||||
parent.modify (Task::modReplace);
|
||||
context.tdb2.modify (parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue