- Fixed bug #737, which allows wait dates after due dates, but provides a
  warning (thanks to Arkady Grudzinsky).
This commit is contained in:
Paul Beckingham
2011-08-23 21:36:09 -04:00
parent 2e09ddd900
commit 89d3b4e805
4 changed files with 9 additions and 9 deletions

View File

@@ -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