validate: Pending tasks cannot have end attribute set
This commit is contained in:
committed by
Paul Beckingham
parent
727602f26f
commit
cc324fdb8d
@@ -1491,6 +1491,10 @@ void Task::validate (bool applyDefault /* = true */)
|
|||||||
(! has ("end") || get ("end") == ""))
|
(! has ("end") || get ("end") == ""))
|
||||||
setAsNow ("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.
|
// Provide an entry date unless user already specified one.
|
||||||
if (! has ("modified") || get ("modified") == "")
|
if (! has ("modified") || get ("modified") == "")
|
||||||
setAsNow ("modified");
|
setAsNow ("modified");
|
||||||
|
|||||||
Reference in New Issue
Block a user