mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +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).
|
handling and a formatting bug (thanks to Steve Rader).
|
||||||
+ Fixed bug #605, which gave misleading project completion percentages under
|
+ Fixed bug #605, which gave misleading project completion percentages under
|
||||||
certain circumstances (thanks to Steve Rader).
|
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
|
+ Fixed bug #645 & #660, which prevented logically combining report filters
|
||||||
(thanks to Bryce Harrington).
|
(thanks to Bryce Harrington).
|
||||||
+ Fixed bug #683, in which the 'config' command sometimes edited comments
|
+ 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
|
// DD 1 1 1 1 1 1 1
|
||||||
// -- ------------------------------------
|
// -- ------------------------------------
|
||||||
//
|
//
|
||||||
// 5 | SS DD DD DD DD
|
// 5 | SS DD DD DD DD
|
||||||
// 4 | SS SS DD DD DD SS SS SS
|
// 4 | SS SS DD DD DD SS SS SS
|
||||||
// 3 | PP PP SS SS SS PP PP PP
|
// 3 | PP PP SS SS SS PP PP PP
|
||||||
// 2 | PP PP PP PP PP PP PP PP PP
|
// 2 | PP PP PP PP PP PP PP PP PP
|
||||||
// 1 | PP PP PP PP PP PP PP PP PP PP
|
// 1 | PP PP PP PP PP PP PP PP PP PP
|
||||||
// 0 +-------------------------------------
|
// 0 +-------------------------------------
|
||||||
// 30 31 01 02 03 04 05 06 07 08 09 10
|
// 30 31 01 02 03 04 05 06 07 08 09 10
|
||||||
// Oct Nov
|
// Oct Nov
|
||||||
|
@ -560,21 +560,37 @@ std::string Chart::render ()
|
||||||
|
|
||||||
optimizeGrid ();
|
optimizeGrid ();
|
||||||
|
|
||||||
// Colorize the grid.
|
if (context.color ())
|
||||||
Color color_pending (context.config.get ("color.burndown.pending"));
|
{
|
||||||
Color color_done (context.config.get ("color.burndown.done"));
|
// Colorize the grid.
|
||||||
Color color_started (context.config.get ("color.burndown.started"));
|
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.
|
// Replace DD, SS, PP with colored strings.
|
||||||
std::string::size_type i;
|
std::string::size_type i;
|
||||||
while ((i = grid.find ("PP")) != std::string::npos)
|
while ((i = grid.find ("PP")) != std::string::npos)
|
||||||
grid.replace (i, 2, color_pending.colorize (" "));
|
grid.replace (i, 2, color_pending.colorize (" "));
|
||||||
|
|
||||||
while ((i = grid.find ("SS")) != std::string::npos)
|
while ((i = grid.find ("SS")) != std::string::npos)
|
||||||
grid.replace (i, 2, color_started.colorize (" "));
|
grid.replace (i, 2, color_started.colorize (" "));
|
||||||
|
|
||||||
while ((i = grid.find ("DD")) != std::string::npos)
|
while ((i = grid.find ("DD")) != std::string::npos)
|
||||||
grid.replace (i, 2, color_done.colorize (" "));
|
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;
|
return grid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue