Task: Correct a false-positive warning
- The command "task 1 modify due: wait:2days" gave the following
output:
Warning: You have specified that the 'wait' date is after the
'due' date.
Now, we check if the due date is zero, in which case the due date is
being removed.
This commit is contained in:
committed by
Paul Beckingham
parent
11009fd3ff
commit
2690d9bdf3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user