Tw-145
- TW-145 default.due should accept a Duration (thanks to Ozgur Akgun).
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
- TW-115 allow "0day" durations for UDAs.
|
||||
- TW-128 new helper command; _envs.
|
||||
- TW-139 Possibility to execute shadow file generation (thanks to Arnoud K).
|
||||
- TW-145 default.due should accept a Duration (thanks to Ozgur Akgun).
|
||||
- TW-168 modification of due date relative to current due date (thanks to Dirk
|
||||
Sarpe).
|
||||
- TW-186 Increase for numerical UDAs (thanks to Steffen Uhlig).
|
||||
|
||||
@@ -1124,7 +1124,8 @@ command, if you don't specify one. The default is blank.
|
||||
default.due=...
|
||||
Provides a default due date for the
|
||||
.I task add
|
||||
command, if you don't specify one. The default is blank.
|
||||
command, if you don't specify one. You can use a date, or a duration value which
|
||||
is assumed to be relative to 'now'. The default is blank.
|
||||
|
||||
.TP
|
||||
.B
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user