From 57d577a1407bad4f7b10a30b5ff2712caeb55b15 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 31 Dec 2010 00:33:43 -0500 Subject: [PATCH] Bug #595 - Fixed bug #595, where taskwarrior ignored changes to the wait date during the edit command, consequently not changing task status (thanks to Eric Fluger). --- ChangeLog | 3 +++ src/edit.cpp | 3 +++ src/util.cpp | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 54cce3a4d..bcf3f22ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -59,6 +59,9 @@ Steve Rader). + Fixed bug #589, where the man page did not adequately describe searching or usage of attribute modifiers (thanks to Steve Rader). + + Fixed bug #595, where taskwarrior ignored changes to the wait date during + the edit command, consequently not changing task status (thanks to Eric + Fluger). ------ old releases ------------------------------ diff --git a/src/edit.cpp b/src/edit.cpp index 06009baf0..9581317f5 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -427,12 +427,14 @@ static void parseTask (Task& task, const std::string& after) { std::cout << "Wait date modified.\n"; task.set ("wait", value); + task.setStatus (Task::waiting); } } else { std::cout << "Wait date modified.\n"; task.set ("wait", value); + task.setStatus (Task::waiting); } } else @@ -441,6 +443,7 @@ static void parseTask (Task& task, const std::string& after) { std::cout << "Wait date removed.\n"; task.remove ("wait"); + task.setStatus (Task::pending); } } diff --git a/src/util.cpp b/src/util.cpp index 978e79d9a..c539da922 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -557,7 +557,8 @@ std::string taskInfoDifferences (const Task& before, const Task& after) std::string renderAttribute (const std::string& name, const std::string& value) { Att a; - if (a.type (name) == "date") + if (a.type (name) == "date" && + value != "") { Date d ((time_t)::atoi (value.c_str ())); return d.toString (context.config.get ("dateformat"));