mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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
1
AUTHORS
1
AUTHORS
|
@ -238,3 +238,4 @@ suggestions:
|
|||
Tomas Babej
|
||||
Nick Person
|
||||
Arnoud K
|
||||
Ozgur Akgun
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue