mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #636
- Fixed bug #636, which causes the burndown reports to not honor the _forcecolor=off setting (thanks to Steve Rader, Uli Martens). Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
parent
28a4947234
commit
7fe5fc80e9
2 changed files with 35 additions and 17 deletions
|
@ -131,6 +131,8 @@
|
|||
handling and a formatting bug (thanks to Steve Rader).
|
||||
+ Fixed bug #605, which gave misleading project completion percentages under
|
||||
certain circumstances (thanks to Steve Rader).
|
||||
+ Fixed bug #636, which causes the burndown reports to not honor the
|
||||
_forcecolor=off setting (thanks to Steve Rader, Uli Martens).
|
||||
+ Fixed bug #645 & #660, which prevented logically combining report filters
|
||||
(thanks to Bryce Harrington).
|
||||
+ Fixed bug #683, in which the 'config' command sometimes edited comments
|
||||
|
|
|
@ -129,11 +129,11 @@ Bar::~Bar ()
|
|||
// DD 1 1 1 1 1 1 1
|
||||
// -- ------------------------------------
|
||||
//
|
||||
// 5 | SS DD DD DD DD
|
||||
// 4 | SS SS DD DD DD SS SS SS
|
||||
// 3 | PP PP SS SS SS PP PP PP
|
||||
// 2 | PP PP PP PP PP PP PP PP PP
|
||||
// 1 | PP PP PP PP PP PP PP PP PP PP
|
||||
// 5 | SS DD DD DD DD
|
||||
// 4 | SS SS DD DD DD SS SS SS
|
||||
// 3 | PP PP SS SS SS PP PP PP
|
||||
// 2 | PP PP PP PP PP PP PP PP PP
|
||||
// 1 | PP PP PP PP PP PP PP PP PP PP
|
||||
// 0 +-------------------------------------
|
||||
// 30 31 01 02 03 04 05 06 07 08 09 10
|
||||
// Oct Nov
|
||||
|
@ -560,21 +560,37 @@ std::string Chart::render ()
|
|||
|
||||
optimizeGrid ();
|
||||
|
||||
// Colorize the grid.
|
||||
Color color_pending (context.config.get ("color.burndown.pending"));
|
||||
Color color_done (context.config.get ("color.burndown.done"));
|
||||
Color color_started (context.config.get ("color.burndown.started"));
|
||||
if (context.color ())
|
||||
{
|
||||
// Colorize the grid.
|
||||
Color color_pending (context.config.get ("color.burndown.pending"));
|
||||
Color color_done (context.config.get ("color.burndown.done"));
|
||||
Color color_started (context.config.get ("color.burndown.started"));
|
||||
|
||||
// Replace DD, SS, PP with colored strings.
|
||||
std::string::size_type i;
|
||||
while ((i = grid.find ("PP")) != std::string::npos)
|
||||
grid.replace (i, 2, color_pending.colorize (" "));
|
||||
// Replace DD, SS, PP with colored strings.
|
||||
std::string::size_type i;
|
||||
while ((i = grid.find ("PP")) != std::string::npos)
|
||||
grid.replace (i, 2, color_pending.colorize (" "));
|
||||
|
||||
while ((i = grid.find ("SS")) != std::string::npos)
|
||||
grid.replace (i, 2, color_started.colorize (" "));
|
||||
while ((i = grid.find ("SS")) != std::string::npos)
|
||||
grid.replace (i, 2, color_started.colorize (" "));
|
||||
|
||||
while ((i = grid.find ("DD")) != std::string::npos)
|
||||
grid.replace (i, 2, color_done.colorize (" "));
|
||||
while ((i = grid.find ("DD")) != std::string::npos)
|
||||
grid.replace (i, 2, color_done.colorize (" "));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Replace DD, SS, PP with ./+/X strings.
|
||||
std::string::size_type i;
|
||||
while ((i = grid.find ("PP")) != std::string::npos)
|
||||
grid.replace (i, 2, " X");
|
||||
|
||||
while ((i = grid.find ("SS")) != std::string::npos)
|
||||
grid.replace (i, 2, " +");
|
||||
|
||||
while ((i = grid.find ("DD")) != std::string::npos)
|
||||
grid.replace (i, 2, " .");
|
||||
}
|
||||
|
||||
return grid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue