Bug #1044
- 'task projects' discard now newly deleted tasks and it includes only filtered tasks for its summary.
This commit is contained in:
committed by
Paul Beckingham
parent
154d99385a
commit
0857b451d6
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user