mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
545013e839
commit
383962173e
3 changed files with 78 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue