From dc2e0c1c9792535c73644b6d59df4b51230bfb40 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Fri, 10 Jan 2014 04:56:46 -0500 Subject: [PATCH] Bug - Fix a bug where CmdEdit reported modifications to a duration UDA when no modifications were made. --- ChangeLog | 1 + src/commands/CmdEdit.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1c96f06fb..627c79b0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -97,6 +97,7 @@ Bugs + Fixed bug where specifying an ID of 0 yielded all completed/deleted tasks (thanks to greenskeleton). + Fixed rc.nag documentation (thanks to Jeroen Budts). + + Fixed bug where task edit incorrectly claimed duration UDA was modified. ------ old releases ------------------------------ diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index fb5bfaf94..6a8028734 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -675,7 +675,9 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string { std::string value = findValue (after, "\n UDA " + col->first + ":"); if ((task.get (col->first) != value) && (type != "date" || - (task.get (col->first) != Date (value, dateformat).toEpochString ()))) + (task.get (col->first) != Date (value, dateformat).toEpochString ())) && + (type != "duration" || + (task.get (col->first) != (std::string) Duration (value) ))) { if (value != "") {