mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 07:57:20 +02:00
Bug #1044
- 'task projects' discard now newly deleted tasks and it includes only filtered tasks for its summary.
This commit is contained in:
parent
154d99385a
commit
0857b451d6
3 changed files with 73 additions and 2 deletions
|
@ -65,14 +65,14 @@ int CmdProjects::execute (std::string& output)
|
|||
tasks.push_back (*task);
|
||||
}
|
||||
|
||||
int quantity = tasks.size ();
|
||||
|
||||
context.tdb2.commit ();
|
||||
|
||||
// Apply filter.
|
||||
std::vector <Task> filtered;
|
||||
filter (tasks, filtered);
|
||||
|
||||
int quantity = filtered.size ();
|
||||
|
||||
std::stringstream out;
|
||||
|
||||
// Scan all the tasks for their project name, building a map using project
|
||||
|
@ -88,6 +88,12 @@ int CmdProjects::execute (std::string& output)
|
|||
std::vector <Task>::iterator task;
|
||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||
{
|
||||
if (task->getStatus () == Task::deleted)
|
||||
{
|
||||
--quantity;
|
||||
continue;
|
||||
}
|
||||
|
||||
project = task->get ("project");
|
||||
priority = task->get ("priority");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue