mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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
|
@ -88,6 +88,10 @@
|
|||
- TW-1282 incorrect URLs in man task-sync (thanks to Jeremiah Marks).
|
||||
- TW-1288 Added missing locking for task modifications (thanks to Kosta Harlan,
|
||||
Ralph Bean, Adam Coddington).
|
||||
- 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).
|
||||
- TW-1295 test/time.t fails on the last day of the month (thanks to Jakub
|
||||
Wilk).
|
||||
- TW-1296 make test/run_all exit with non-zero code if a test fail (thanks to
|
||||
|
|
|
@ -90,10 +90,9 @@ int CmdAnnotate::execute (std::string& output)
|
|||
// Annotate siblings.
|
||||
if (task->has ("parent"))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
if (siblings.size () &&
|
||||
confirm (STRING_CMD_ANNO_CONFIRM_R))
|
||||
if (confirm (STRING_CMD_ANNO_CONFIRM_R))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
std::vector <Task>::iterator sibling;
|
||||
for (sibling = siblings.begin (); sibling != siblings.end (); ++sibling)
|
||||
{
|
||||
|
|
|
@ -90,10 +90,9 @@ int CmdAppend::execute (std::string& output)
|
|||
// Append to siblings.
|
||||
if (task->has ("parent"))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
if (siblings.size () &&
|
||||
confirm (STRING_CMD_APPEND_CONFIRM_R))
|
||||
if (confirm (STRING_CMD_APPEND_CONFIRM_R))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
std::vector <Task>::iterator sibling;
|
||||
for (sibling = siblings.begin (); sibling != siblings.end (); ++sibling)
|
||||
{
|
||||
|
|
|
@ -103,10 +103,9 @@ int CmdDelete::execute (std::string& output)
|
|||
// Delete siblings.
|
||||
if (task->has ("parent"))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
if (siblings.size () &&
|
||||
confirm (STRING_CMD_DELETE_CONFIRM_R))
|
||||
if (confirm (STRING_CMD_DELETE_CONFIRM_R))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
std::vector <Task>::iterator sibling;
|
||||
for (sibling = siblings.begin (); sibling != siblings.end (); ++sibling)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,10 +90,9 @@ int CmdPrepend::execute (std::string& output)
|
|||
// Prepend to siblings.
|
||||
if (task->has ("parent"))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
if (siblings.size () &&
|
||||
confirm (STRING_CMD_PREPEND_CONFIRM_R))
|
||||
if (confirm (STRING_CMD_PREPEND_CONFIRM_R))
|
||||
{
|
||||
std::vector <Task> siblings = context.tdb2.siblings (*task);
|
||||
std::vector <Task>::iterator sibling;
|
||||
for (sibling = siblings.begin (); sibling != siblings.end (); ++sibling)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue