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
|
Tomas Babej
|
||||||
Nick Person
|
Nick Person
|
||||||
Arnoud K
|
Arnoud K
|
||||||
|
Ozgur Akgun
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
- TW-115 allow "0day" durations for UDAs.
|
- TW-115 allow "0day" durations for UDAs.
|
||||||
- TW-128 new helper command; _envs.
|
- TW-128 new helper command; _envs.
|
||||||
- TW-139 Possibility to execute shadow file generation (thanks to Arnoud K).
|
- 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
|
- TW-168 modification of due date relative to current due date (thanks to Dirk
|
||||||
Sarpe).
|
Sarpe).
|
||||||
- TW-186 Increase for numerical UDAs (thanks to Steffen Uhlig).
|
- 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=...
|
default.due=...
|
||||||
Provides a default due date for the
|
Provides a default due date for the
|
||||||
.I task add
|
.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
|
.TP
|
||||||
.B
|
.B
|
||||||
|
|
|
@ -1399,8 +1399,14 @@ void Task::validate (bool applyDefault /* = true */)
|
||||||
! has ("due"))
|
! has ("due"))
|
||||||
{
|
{
|
||||||
if (context.columns["due"]->validate (Task::defaultDue))
|
if (context.columns["due"]->validate (Task::defaultDue))
|
||||||
|
{
|
||||||
|
Duration dur (Task::defaultDue);
|
||||||
|
if ((time_t) dur != 0)
|
||||||
|
set ("due", (Date () + dur).toEpoch ());
|
||||||
|
else
|
||||||
set ("due", Date (Task::defaultDue).toEpoch ());
|
set ("due", Date (Task::defaultDue).toEpoch ());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If a UDA has a default value in the configuration,
|
// If a UDA has a default value in the configuration,
|
||||||
// override with uda.(uda).default, if not specified.
|
// override with uda.(uda).default, if not specified.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue