Changed configuration option name and added documentation.
This commit is contained in:
committed by
Tomas Babej
parent
1d804ae7c8
commit
cb07e93ddd
@@ -540,6 +540,12 @@ Taskwarrior supports command aliases. This alias provides an alternate name
|
||||
any of the commands. Several commands you may use are actually aliases -
|
||||
the 'history' report, for example, or 'export'.
|
||||
|
||||
.TP
|
||||
.B burndown.cumulative=0
|
||||
May be "1" or "0", and controls the behaviour of the burndown command. When set
|
||||
to 1, it sums up all completed tasks, otherwise they only get plotted in the
|
||||
interval where the task was completed. Defaults to 1.
|
||||
|
||||
.SS DATES
|
||||
|
||||
.TP
|
||||
|
||||
@@ -235,7 +235,17 @@ void Chart::scan (std::vector <Task>& tasks)
|
||||
Datetime now;
|
||||
|
||||
time_t epoch;
|
||||
bool cumulative = !Context::getContext ().config.getBoolean ("burndown.nc");
|
||||
auto& config = Context::getContext ().config;
|
||||
bool cumulative;
|
||||
if (config.has ("burndown.cumulative"))
|
||||
{
|
||||
cumulative = config.getBoolean ("burndown.cumulative");
|
||||
}
|
||||
else
|
||||
{
|
||||
cumulative = true;
|
||||
}
|
||||
|
||||
for (auto& task : tasks)
|
||||
{
|
||||
// The entry date is when the counting starts.
|
||||
|
||||
@@ -66,7 +66,7 @@ class TestBurndownCommand(TestCase):
|
||||
|
||||
def test_burndown_daily_non_cumulative(self):
|
||||
"""Ensure burndown.daily in non-cumulative mode generates a chart"""
|
||||
self.t.config("burndown.nc", True)
|
||||
self.t.config("burndown.cumulative", False)
|
||||
code, out, err = self.t("burndown.daily")
|
||||
self.assertIn("Daily Burndown", out)
|
||||
self.assertIn(".", out)
|
||||
|
||||
Reference in New Issue
Block a user