mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CmdBurndown: Removed unreachable code (completed/deleted tasks have no 'start' date)
This commit is contained in:
parent
258328facd
commit
958637e2ca
1 changed files with 16 additions and 70 deletions
|
@ -293,51 +293,20 @@ void Chart::scan (std::vector <Task>& tasks)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.has ("start"))
|
while (from < end)
|
||||||
{
|
{
|
||||||
ISO8601d start = quantize (ISO8601d (task.get_date ("start")));
|
epoch = from.toEpoch ();
|
||||||
while (from < start)
|
if (_bars.find (epoch) != _bars.end ())
|
||||||
{
|
++_bars[epoch]._pending;
|
||||||
epoch = from.toEpoch ();
|
from = increment (from);
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._started;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < now)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._done;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ISO8601d end = quantize (ISO8601d (task.get_date ("end")));
|
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < now)
|
while (from < now)
|
||||||
{
|
{
|
||||||
epoch = from.toEpoch ();
|
epoch = from.toEpoch ();
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
if (_bars.find (epoch) != _bars.end ())
|
||||||
++_bars[epoch]._done;
|
++_bars[epoch]._done;
|
||||||
from = increment (from);
|
from = increment (from);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,35 +323,12 @@ void Chart::scan (std::vector <Task>& tasks)
|
||||||
if (end < _earliest)
|
if (end < _earliest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (task.has ("start"))
|
while (from < end)
|
||||||
{
|
{
|
||||||
ISO8601d start = quantize (ISO8601d (task.get_date ("start")));
|
epoch = from.toEpoch ();
|
||||||
while (from < start)
|
if (_bars.find (epoch) != _bars.end ())
|
||||||
{
|
++_bars[epoch]._pending;
|
||||||
epoch = from.toEpoch ();
|
from = increment (from);
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._started;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ISO8601d end = quantize (ISO8601d (task.get_date ("end")));
|
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue