mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
Bug Fix - recurring task with no due date
- A recurring task may not be added without a due date. Previously, this restriction only applied to modified tasks.
This commit is contained in:
parent
0499bfff49
commit
fc8f8957c4
2 changed files with 10 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
Federico Hernandez).
|
||||
+ Fixed bug #242 that sometimes causes the ID echoed after a task is added
|
||||
to be incorrect (thanks to John Florian).
|
||||
+ Fixed bug that allowed a recurring task to be added without a due date.
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
|
|
@ -84,6 +84,15 @@ std::string handleAdd ()
|
|||
foreach (tag, context.tagAdditions)
|
||||
context.task.addTag (*tag);
|
||||
|
||||
// Perform some logical consistency checks.
|
||||
if (context.task.has ("recur") &&
|
||||
!context.task.has ("due"))
|
||||
throw std::string ("You cannot specify a recurring task without a due date.");
|
||||
|
||||
if (context.task.has ("until") &&
|
||||
!context.task.has ("recur"))
|
||||
throw std::string ("You cannot specify an until date for a non-recurring task.");
|
||||
|
||||
// Only valid tasks can be added.
|
||||
context.task.validate ();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue