mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
Feedback
- When bulk tasks are modified, the "project changed" messages are now retained until processing is completed, so that only one message per project is generated.
This commit is contained in:
parent
d4f85484df
commit
46b275c3ce
9 changed files with 95 additions and 13 deletions
|
@ -66,6 +66,9 @@ int CmdDelete::execute (std::string& output)
|
|||
// Apply the command line modifications to the new task.
|
||||
A3 modifications = context.a3.extract_modifications ();
|
||||
|
||||
// Accumulated project change notifications.
|
||||
std::map <std::string, std::string> projectChanges;
|
||||
|
||||
std::vector <Task>::iterator task;
|
||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||
{
|
||||
|
@ -99,7 +102,7 @@ int CmdDelete::execute (std::string& output)
|
|||
feedback_affected (STRING_CMD_DELETE_TASK, *task);
|
||||
feedback_unblocked (*task);
|
||||
dependencyChainOnComplete (*task);
|
||||
context.footnote (onProjectChange (*task, true));
|
||||
projectChanges[task->get ("project")] = onProjectChange (*task, true);
|
||||
|
||||
// Delete siblings.
|
||||
if (task->has ("parent"))
|
||||
|
@ -150,6 +153,12 @@ int CmdDelete::execute (std::string& output)
|
|||
}
|
||||
}
|
||||
|
||||
// Now list the project changes.
|
||||
std::map <std::string, std::string>::iterator i;
|
||||
for (i = projectChanges.begin (); i != projectChanges.end (); ++i)
|
||||
if (i->first != "")
|
||||
context.footnote (i->second);
|
||||
|
||||
context.tdb2.commit ();
|
||||
feedback_affected (count == 1 ? STRING_CMD_DELETE_1 : STRING_CMD_DELETE_N, count);
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue