Feature #953
- Added Feature #953, which includes the total number of blocked and blocking tasks to the 'statistics' command output (thanks to T. Charles Yun).
This commit is contained in:
@@ -94,6 +94,8 @@ int CmdStatistics::execute (std::string& output)
|
||||
int taggedT = 0;
|
||||
int annotationsT = 0;
|
||||
int recurringT = 0;
|
||||
int blockingT = 0;
|
||||
int blockedT = 0;
|
||||
float daysPending = 0.0;
|
||||
int descLength = 0;
|
||||
std::map <std::string, int> allTags;
|
||||
@@ -114,6 +116,9 @@ int CmdStatistics::execute (std::string& output)
|
||||
case Task::waiting: ++waitingT; break;
|
||||
}
|
||||
|
||||
if (task->is_blocked) ++blockedT;
|
||||
if (task->is_blocking) ++blockingT;
|
||||
|
||||
time_t entry = strtol (task->get ("entry").c_str (), NULL, 10);
|
||||
if (entry < earliest) earliest = entry;
|
||||
if (entry > latest) latest = entry;
|
||||
@@ -189,6 +194,14 @@ int CmdStatistics::execute (std::string& output)
|
||||
view.set (row, 0, STRING_CMD_STATS_PROJECTS);
|
||||
view.set (row, 1, (int)allProjects.size ());
|
||||
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, STRING_CMD_STATS_BLOCKED);
|
||||
view.set (row, 1, blockedT);
|
||||
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, STRING_CMD_STATS_BLOCKING);
|
||||
view.set (row, 1, blockingT);
|
||||
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, STRING_CMD_STATS_DATA_SIZE);
|
||||
view.set (row, 1, formatBytes (dataSize));
|
||||
|
||||
Reference in New Issue
Block a user