- TW-145 default.due should accept a Duration (thanks to Ozgur Akgun).
This commit is contained in:
Paul Beckingham 2014-12-27 14:44:31 -05:00
parent 8590af8cf2
commit bbc40c051d
4 changed files with 11 additions and 2 deletions

View file

@ -1399,7 +1399,13 @@ void Task::validate (bool applyDefault /* = true */)
! has ("due"))
{
if (context.columns["due"]->validate (Task::defaultDue))
set ("due", Date (Task::defaultDue).toEpoch ());
{
Duration dur (Task::defaultDue);
if ((time_t) dur != 0)
set ("due", (Date () + dur).toEpoch ());
else
set ("due", Date (Task::defaultDue).toEpoch ());
}
}
// If a UDA has a default value in the configuration,