Bug Fix - summary report included deleted tasks

- Applied patch from Benjamin Tegarden to exclude deleted tasks from
  the summary report.
This commit is contained in:
Paul Beckingham 2009-03-14 13:47:48 -04:00
parent bdd1b16ba0
commit 2d2bd47075
4 changed files with 12 additions and 3 deletions

View file

@ -7,6 +7,7 @@ Contributing Authors:
H. İbrahim Güngör H. İbrahim Güngör
Stefan Dorn Stefan Dorn
Michael Greb Michael Greb
Benjamin Tegarden
With thanks to: With thanks to:
Eugene Kramer Eugene Kramer
@ -24,5 +25,4 @@ With thanks to:
Russell Friesenhahn Russell Friesenhahn
Paolo Marsi Paolo Marsi
Eric Farris Eric Farris
Benjamin Tegarden

View file

@ -38,6 +38,8 @@
file locking is used. file locking is used.
+ Task export feature now includes recurrence information, removes nested + Task export feature now includes recurrence information, removes nested
quotes, and limits output to pending tasks. quotes, and limits output to pending tasks.
+ Task no longer includes deleted tasks in the summary report (thanks to
Benjamin Tegarden).
------ old releases ------------------------------ ------ old releases ------------------------------

View file

@ -132,6 +132,8 @@
file locking is used. file locking is used.
<li>Task export feature now includes recurrence information, removes nested <li>Task export feature now includes recurrence information, removes nested
quotes, and limits output to pending tasks. quotes, and limits output to pending tasks.
<li>Task no longer includes deleted tasks in the summary report (thanks to
Benjamin Tegarden).
</ul> </ul>
<p> <p>

View file

@ -496,13 +496,18 @@ std::string handleReportSummary (TDB& tdb, T& task, Config& conf)
{ {
T task (completed[i]); T task (completed[i]);
std::string project = task.getAttribute ("project"); std::string project = task.getAttribute ("project");
countCompleted[project] = countCompleted[project] + 1; if (task.getStatus () == T::deleted)
++counter[project]; continue;
++countCompleted[project];
time_t entry = ::atoi (task.getAttribute ("entry").c_str ()); time_t entry = ::atoi (task.getAttribute ("entry").c_str ());
time_t end = ::atoi (task.getAttribute ("end").c_str ()); time_t end = ::atoi (task.getAttribute ("end").c_str ());
if (entry && end) if (entry && end)
{
sumEntry[project] = sumEntry[project] + (double) (end - entry); sumEntry[project] = sumEntry[project] + (double) (end - entry);
++counter[project];
}
} }
// Create a table for output. // Create a table for output.