From c08c280dd9d3e755f3fe6130bc6546a969b09d7e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 9 Jan 2011 23:39:05 -0500 Subject: [PATCH] Feature #608 - Added feature #608, and now completing a task, with journal.time turned on will stop the task first (thanks to Andy Kriger). --- AUTHORS | 1 + ChangeLog | 2 ++ src/command.cpp | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/AUTHORS b/AUTHORS index 4a7c7042c..480a00ffe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -72,4 +72,5 @@ suggestions: Erlan Sergaziev Eric Fluger Steve Rader + Andy Kriger diff --git a/ChangeLog b/ChangeLog index daa665d3f..90485a875 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ month to be displayed in the calendar report (thanks to Michelle Crane). + Added feature #574, default due dates (thanks to Erlan Sergaziev). + Added feature #575, including Danish holidays (thanks to Irfan Siddiqui). + + Added feature #608, and now completing a task, with journal.time turned on + will stop the task first (thanks to Andy Kriger). + Eliminated dependency on ncurses. + The dependency columns are now right-justified (thanks to Eric Fluger). + Fixed bug that caused the 'done' command to always exit with a non-zero diff --git a/src/command.cpp b/src/command.cpp index 41df83ae0..2a8e9e222 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1862,6 +1862,11 @@ int handleDone (std::string& outs) // Change status. task->setStatus (Task::completed); + // Stop the task, if started. + if (task->has ("start") && + context.config.getBoolean ("journal.time")) + task->addAnnotation (context.config.get ("journal.time.stop.annotation")); + // Only allow valid tasks. task->validate ();