diff --git a/ChangeLog b/ChangeLog index 9a07849c5..0058c17f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ was run, and there are no tasks with due dates. + Fixed bug #316 which caused the timesheet report to display an oddly sorted list. + + Fixed bug #317 which colored tasks in the 'completed' report according to + due dates, which are no longer relevant to a completed task (thanks to + Cory Donnelly). + + Fixed bug that was causing the 'completed' report to sort incorrectly. ------ old releases ------------------------------ diff --git a/src/custom.cpp b/src/custom.cpp index 2ea490b56..160f3214f 100644 --- a/src/custom.cpp +++ b/src/custom.cpp @@ -460,6 +460,7 @@ int runCustomReport ( std::string column = sortColumn->substr (0, sortColumn->length () - 1); char direction = (*sortColumn)[sortColumn->length () - 1]; + // TODO This code should really be using Att::type. if (column == "id") table.sortOn (columnIndex[column], (direction == '+' ? @@ -473,7 +474,7 @@ int runCustomReport ( Table::descendingPriority)); else if (column == "entry" || column == "start" || column == "due" || - column == "wait") + column == "wait" || column == "until" || column == "end") table.sortOn (columnIndex[column], (direction == '+' ? Table::ascendingDate : diff --git a/src/rules.cpp b/src/rules.cpp index 5751b56ab..44b484574 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -58,6 +58,8 @@ void autoColorize (Task& task, Color& c) // Note: fg, bg already contain colors specifically assigned via command. // Note: These rules form a hierarchy - the last rule is King. + Task::status status = task.getStatus (); + // Colorization of the tagged. if (gsColor["color.tagged"].nontrivial ()) if (task.getTagCount ()) @@ -83,8 +85,10 @@ void autoColorize (Task& task, Color& c) if (task.get ("priority") == "") c.blend (gsColor["color.pri.none"]); - // Colorization of the active. - if (gsColor["color.active"].nontrivial ()) + // Colorization of the active, if not completed/deleted. + if (gsColor["color.active"].nontrivial () && + status != Task::completed && + status != Task::deleted) if (task.has ("start")) c.blend (gsColor["color.active"]); @@ -124,7 +128,9 @@ void autoColorize (Task& task, Color& c) } // Colorization of the due and overdue. - if (task.has ("due")) + if (task.has ("due") && + status != Task::completed && + status != Task::deleted) { std::string due = task.get ("due"); switch (getDueState (due))