mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-04 03:18:33 +02:00
Bug #737
- Fixed bug #737, which allows wait dates after due dates, but provides a warning (thanks to Arkady Grudzinsky).
This commit is contained in:
parent
2e09ddd900
commit
89d3b4e805
4 changed files with 9 additions and 9 deletions
|
@ -1091,30 +1091,27 @@ void Task::validate () const
|
|||
Date due (get_date ("due"));
|
||||
|
||||
// Verify wait < due
|
||||
// TODO Downgrade to warning.
|
||||
if (has ("wait"))
|
||||
{
|
||||
Date wait (get_date ("wait"));
|
||||
if (wait > due)
|
||||
throw std::string (STRING_TASK_VALID_WAIT);
|
||||
context.footnote (STRING_TASK_VALID_WAIT);
|
||||
}
|
||||
|
||||
Date entry (get_date ("entry"));
|
||||
|
||||
// TODO Downgrade to warning.
|
||||
if (has ("start"))
|
||||
{
|
||||
Date start (get_date ("start"));
|
||||
if (entry > start)
|
||||
throw std::string (STRING_TASK_VALID_START);
|
||||
context.footnote (STRING_TASK_VALID_START);
|
||||
}
|
||||
|
||||
// TODO Downgrade to warning.
|
||||
if (has ("end"))
|
||||
{
|
||||
Date end (get_date ("end"));
|
||||
if (entry > end)
|
||||
throw std::string (STRING_TASK_VALID_END);
|
||||
context.footnote (STRING_TASK_VALID_END);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -419,9 +419,9 @@
|
|||
#define STRING_TASK_VALID_ENTRY "A task must have an entry timestamp."
|
||||
#define STRING_TASK_VALID_DESC "A task must have a description."
|
||||
#define STRING_TASK_VALID_BLANK "Cannot add a task that is blank."
|
||||
#define STRING_TASK_VALID_WAIT "A 'wait' date must be before a 'due' date."
|
||||
#define STRING_TASK_VALID_START "A 'start' date must be after an 'entry' date."
|
||||
#define STRING_TASK_VALID_END "An 'end' date must be after an 'entry' date."
|
||||
#define STRING_TASK_VALID_WAIT "Warning: You have specified a 'wait' date that is after the 'due' date."
|
||||
#define STRING_TASK_VALID_START "Warning: You have specified a 'start' date that is before the 'entry' date."
|
||||
#define STRING_TASK_VALID_END "Warning: You have specified an 'end' date that is before the 'entry' date."
|
||||
#define STRING_TASK_VALID_REC_DUE "A recurring task must also have a 'due' date."
|
||||
#define STRING_TASK_VALID_UNTIL "Only recurring tasks may have an 'until' date."
|
||||
#define STRING_TASK_VALID_RECUR "The recurrence value '{1}' is not valid."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue