mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug #476
- Fixed bug #476, so that task now issues a warning when a wait date falls after a due date (thanks to T. Charles Yun).
This commit is contained in:
parent
04ddf74a07
commit
db9333ec64
2 changed files with 12 additions and 0 deletions
|
@ -66,6 +66,8 @@
|
||||||
+ Fixed bug #466, which gave the wrong error message when a custom report
|
+ Fixed bug #466, which gave the wrong error message when a custom report
|
||||||
was missing a direction indicator for the sort order.
|
was missing a direction indicator for the sort order.
|
||||||
+ Fixed bug #470, which caused task to not support the color 'none'.
|
+ Fixed bug #470, which caused task to not support the color 'none'.
|
||||||
|
+ Fixed bug #476, so that task now issues a warning when a wait date falls
|
||||||
|
after a due date.
|
||||||
+ Fixed bug #480, which didn't properly support @ characters in tags. This
|
+ Fixed bug #480, which didn't properly support @ characters in tags. This
|
||||||
also now supports $ and #.
|
also now supports $ and #.
|
||||||
+ Fixed problem with command line configuration overrides that had no
|
+ Fixed problem with command line configuration overrides that had no
|
||||||
|
|
|
@ -96,6 +96,11 @@ int handleAdd (std::string &outs)
|
||||||
context.task.addTag (*tag);
|
context.task.addTag (*tag);
|
||||||
|
|
||||||
// Perform some logical consistency checks.
|
// Perform some logical consistency checks.
|
||||||
|
if (context.task.has ("wait") &&
|
||||||
|
context.task.has ("due") &&
|
||||||
|
Date (context.task.get ("due")) < Date (context.task.get ("wait")))
|
||||||
|
context.footnote ("Warning: the wait date falls after the due date.");
|
||||||
|
|
||||||
if (context.task.has ("recur") &&
|
if (context.task.has ("recur") &&
|
||||||
!context.task.has ("due"))
|
!context.task.has ("due"))
|
||||||
throw std::string ("You cannot specify a recurring task without a due date.");
|
throw std::string ("You cannot specify a recurring task without a due date.");
|
||||||
|
@ -1588,6 +1593,11 @@ int handleModify (std::string &outs)
|
||||||
context.task.get ("recur") == "")
|
context.task.get ("recur") == "")
|
||||||
throw std::string ("You cannot remove the recurrence from a recurring task.");
|
throw std::string ("You cannot remove the recurrence from a recurring task.");
|
||||||
|
|
||||||
|
if ((task->has ("wait") && context.task.has ("due") && Date (context.task.get ("due")) < Date (task->get ("wait"))) ||
|
||||||
|
(context.task.has ("wait") && task->has ("due") && Date (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.
|
// Make all changes.
|
||||||
foreach (other, all)
|
foreach (other, all)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue