- A test for due date < wait date in command.cpp only sometimes added
  an extra context.footnote complaining about the condition and was removed.
This commit is contained in:
Cory Donnelly 2011-01-31 18:31:57 -05:00
parent feb19cafdd
commit 6b5253e6a0

View file

@ -1985,29 +1985,6 @@ int handleModify (std::string& outs)
context.task.get ("recur") == "")
throw std::string ("You cannot remove the recurrence from a recurring task.");
// This looks unnecessarily complex, but isn't. "due" and "wait" are
// independent and may exist without the other, but if both exist then wait
// must be before due.
if ((task->has ("wait") &&
context.task.has ("due") &&
Date (context.task.get ("due")) < Date (task->get ("wait")))
||
(context.task.has ("wait") &&
!context.task.has ("due") &&
task->has ("due") &&
Date (task->get ("due")) < Date (context.task.get ("wait")))
||
(context.task.has ("wait") &&
context.task.has ("due") &&
Date (context.task.get ("due")) < Date (context.task.get ("wait")))
||
(task->has ("wait") &&
task->has ("due") &&
Date (task->get ("due")) < Date (task->get ("wait"))))
{
context.footnote ("Warning: the wait date falls after the due date.");
}
// Make all changes.
bool warned = false;
foreach (other, all)