mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
11009fd3ff
commit
2690d9bdf3
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue