mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
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:
parent
bb167b2275
commit
68963ad3e4
4 changed files with 18 additions and 0 deletions
|
@ -5,6 +5,8 @@
|
||||||
Features
|
Features
|
||||||
+ Added Feature #685, which provides a 'blocking' report, and new color rule
|
+ Added Feature #685, which provides a 'blocking' report, and new color rule
|
||||||
(thanks to Michelle Crane).
|
(thanks to Michelle Crane).
|
||||||
|
+ Added Feature #953, which includes the total number of blocked and blocking
|
||||||
|
tasks to the 'statistics' command output (thanks to T. Charles Yun).
|
||||||
+ Added Feature #1069, which gives a clearer error when a UDA
|
+ Added Feature #1069, which gives a clearer error when a UDA
|
||||||
is added without the uda.<uda-name>.type variable.
|
is added without the uda.<uda-name>.type variable.
|
||||||
+ The 'projects' command now outputs abstract parents and reduces
|
+ The 'projects' command now outputs abstract parents and reduces
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ New Features in taskwarrior 2.2.0
|
||||||
appear as orphaned UDAs.
|
appear as orphaned UDAs.
|
||||||
- Tasks now have a 'modified' attribute, which indicates the last time, if at
|
- Tasks now have a 'modified' attribute, which indicates the last time, if at
|
||||||
all, that they were modified.
|
all, that they were modified.
|
||||||
|
- Statistics now report total number of blocked and blocking tasks.
|
||||||
|
|
||||||
New commands in taskwarrior 2.2.0
|
New commands in taskwarrior 2.2.0
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,8 @@ int CmdStatistics::execute (std::string& output)
|
||||||
int taggedT = 0;
|
int taggedT = 0;
|
||||||
int annotationsT = 0;
|
int annotationsT = 0;
|
||||||
int recurringT = 0;
|
int recurringT = 0;
|
||||||
|
int blockingT = 0;
|
||||||
|
int blockedT = 0;
|
||||||
float daysPending = 0.0;
|
float daysPending = 0.0;
|
||||||
int descLength = 0;
|
int descLength = 0;
|
||||||
std::map <std::string, int> allTags;
|
std::map <std::string, int> allTags;
|
||||||
|
@ -114,6 +116,9 @@ int CmdStatistics::execute (std::string& output)
|
||||||
case Task::waiting: ++waitingT; break;
|
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);
|
time_t entry = strtol (task->get ("entry").c_str (), NULL, 10);
|
||||||
if (entry < earliest) earliest = entry;
|
if (entry < earliest) earliest = entry;
|
||||||
if (entry > latest) latest = 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, 0, STRING_CMD_STATS_PROJECTS);
|
||||||
view.set (row, 1, (int)allProjects.size ());
|
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 ();
|
row = view.addRow ();
|
||||||
view.set (row, 0, STRING_CMD_STATS_DATA_SIZE);
|
view.set (row, 0, STRING_CMD_STATS_DATA_SIZE);
|
||||||
view.set (row, 1, formatBytes (dataSize));
|
view.set (row, 1, formatBytes (dataSize));
|
||||||
|
|
|
@ -260,6 +260,8 @@
|
||||||
#define STRING_CMD_STATS_DESC_LEN "Average desc length"
|
#define STRING_CMD_STATS_DESC_LEN "Average desc length"
|
||||||
#define STRING_CMD_STATS_CHARS "{1} characters"
|
#define STRING_CMD_STATS_CHARS "{1} characters"
|
||||||
#define STRING_CMD_STATS_LAST_SYNCH "Last server synchronization"
|
#define STRING_CMD_STATS_LAST_SYNCH "Last server synchronization"
|
||||||
|
#define STRING_CMD_STATS_BLOCKED "Blocked tasks"
|
||||||
|
#define STRING_CMD_STATS_BLOCKING "Blocking tasks"
|
||||||
#define STRING_CMD_REPORTS_USAGE "Lists all supported reports"
|
#define STRING_CMD_REPORTS_USAGE "Lists all supported reports"
|
||||||
#define STRING_CMD_REPORTS_REPORT "Report"
|
#define STRING_CMD_REPORTS_REPORT "Report"
|
||||||
#define STRING_CMD_REPORTS_DESC "Description"
|
#define STRING_CMD_REPORTS_DESC "Description"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue