mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
validate: Pending tasks cannot have end attribute set
This commit is contained in:
parent
75403c0ec1
commit
8a50d8b6a9
1 changed files with 4 additions and 0 deletions
|
@ -1491,6 +1491,10 @@ void Task::validate (bool applyDefault /* = true */)
|
|||
(! has ("end") || get ("end") == ""))
|
||||
setAsNow ("end");
|
||||
|
||||
// Pending tasks cannot have an end date, remove if present
|
||||
if ((status == Task::pending) && (get ("end") != ""))
|
||||
remove ("end");
|
||||
|
||||
// Provide an entry date unless user already specified one.
|
||||
if (! has ("modified") || get ("modified") == "")
|
||||
setAsNow ("modified");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue