diff --git a/ChangeLog b/ChangeLog index 10a933754..12600cb1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -197,6 +197,8 @@ of 'urgency.user.tag.next.coefficient'. - The long deprecated syntax of color values with underscores (i.e 'on_red') is no longer supported. +- Correct a false-positive warning when a due date is removed and a wait is + added. ------ current release --------------------------- diff --git a/src/Task.cpp b/src/Task.cpp index bbeb0ef35..85b65a133 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1572,7 +1572,8 @@ void Task::validate_before (const std::string& left, const std::string& right) Date date_left (get_date (left)); Date date_right (get_date (right)); - if (date_left > date_right) + // if date is zero, then it is being removed (e.g. "due: wait:1day") + if (date_left > date_right && date_right != 0) context.footnote (format (STRING_TASK_VALID_BEFORE, left, right)); } #endif