mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Change nagging behavior
Don't nag if the specified set of tasks consists only of highest urgency tasks.
This commit is contained in:
parent
4dea5dd944
commit
fb6c42f375
1 changed files with 6 additions and 4 deletions
|
@ -68,7 +68,7 @@ int CmdDone::execute (std::string&)
|
|||
// Accumulated project change notifications.
|
||||
std::map <std::string, std::string> projectChanges;
|
||||
|
||||
auto nagged = false;
|
||||
Task& lowest = filtered.front();
|
||||
for (auto& task : filtered)
|
||||
{
|
||||
Task before (task);
|
||||
|
@ -101,8 +101,8 @@ int CmdDone::execute (std::string&)
|
|||
++count;
|
||||
feedback_affected ("Completed task {1} '{2}'.", task);
|
||||
feedback_unblocked (task);
|
||||
if (!nagged)
|
||||
nagged = nag (task);
|
||||
if (task.urgency () < lowest.urgency ())
|
||||
lowest = task;
|
||||
dependencyChainOnComplete (task);
|
||||
if (Context::getContext ().verbose ("project"))
|
||||
projectChanges[task.get ("project")] = onProjectChange (task);
|
||||
|
@ -124,7 +124,9 @@ int CmdDone::execute (std::string&)
|
|||
rc = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
nag(lowest);
|
||||
|
||||
// Now list the project changes.
|
||||
for (const auto& change : projectChanges)
|
||||
if (change.first != "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue