Bug Fix - #360 Huh? "You cannot remove the recurrence from a recurring task. "
- The logic for detecting changes to a recurring task was wrong. - Added unit tests for this bug.
This commit is contained in:
@@ -1133,13 +1133,14 @@ int handleModify (std::string &outs)
|
||||
!task->has ("recur"))
|
||||
throw std::string ("You cannot specify an until date for a non-recurring task.");
|
||||
|
||||
if (task->has ("due") &&
|
||||
!context.task.has ("due") &&
|
||||
context.task.has ("recur"))
|
||||
if (task->has ("due") &&
|
||||
context.task.has ("due") &&
|
||||
context.task.get ("due") == "")
|
||||
throw std::string ("You cannot remove the due date from a recurring task.");
|
||||
|
||||
if (task->has ("recur") &&
|
||||
!context.task.has ("recur"))
|
||||
if (task->has ("recur") &&
|
||||
context.task.has ("recur") &&
|
||||
context.task.get ("recur") == "")
|
||||
throw std::string ("You cannot remove the recurrence from a recurring task.");
|
||||
|
||||
// Make all changes.
|
||||
|
||||
Reference in New Issue
Block a user