- Display error for empty due: attribute when adding recurring tasks.
- Prevent endless loop for tasks that have an empty due: attribute.
This commit is contained in:
Wilhelm Schuermann
2014-11-15 16:37:15 +01:00
committed by Paul Beckingham
parent 7422a76153
commit 00b15ca407
2 changed files with 5 additions and 1 deletions

View File

@@ -1451,7 +1451,7 @@ void Task::validate (bool applyDefault /* = true */)
throw std::string (STRING_TASK_VALID_BLANK);
// Cannot have a recur frequency with no due date - when would it recur?
if (! has ("due") && has ("recur"))
if (has ("recur") && (! has ("due") || get ("due") == ""))
throw std::string (STRING_TASK_VALID_REC_DUE);
// Recur durations must be valid.