mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-07 22:58:34 +02:00
Tw-145
- TW-145 default.due should accept a Duration (thanks to Ozgur Akgun).
This commit is contained in:
parent
8590af8cf2
commit
bbc40c051d
4 changed files with 11 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue