Task: Recurring tasks get rtype:periodic by default
This commit is contained in:
18
src/Task.cpp
18
src/Task.cpp
@@ -1506,12 +1506,16 @@ void Task::validate (bool applyDefault /* = true */)
|
|||||||
else
|
else
|
||||||
set ("uuid", uuid ());
|
set ("uuid", uuid ());
|
||||||
|
|
||||||
|
// TODO Obsolete remove for 2.6.0
|
||||||
// Recurring tasks get a special status.
|
// Recurring tasks get a special status.
|
||||||
if (status == Task::pending &&
|
if (status == Task::pending &&
|
||||||
has ("due") &&
|
has ("due") &&
|
||||||
has ("recur") &&
|
has ("recur") &&
|
||||||
(! has ("parent") || get ("parent") == ""))
|
(! has ("parent") || get ("parent") == "") &&
|
||||||
|
(! has ("tenplate") || get ("tenplate") == ""))
|
||||||
|
{
|
||||||
status = Task::recurring;
|
status = Task::recurring;
|
||||||
|
}
|
||||||
|
|
||||||
// Tasks with a wait: date get a special status.
|
// Tasks with a wait: date get a special status.
|
||||||
else if (status == Task::pending &&
|
else if (status == Task::pending &&
|
||||||
@@ -1523,6 +1527,12 @@ void Task::validate (bool applyDefault /* = true */)
|
|||||||
else if (! has ("status") || get ("status") == "")
|
else if (! has ("status") || get ("status") == "")
|
||||||
status = Task::pending;
|
status = Task::pending;
|
||||||
|
|
||||||
|
if (status == Task::recurring &&
|
||||||
|
(! has ("rtype") || get ("rtype") == ""))
|
||||||
|
{
|
||||||
|
set ("rtype", "periodic");
|
||||||
|
}
|
||||||
|
|
||||||
// Store the derived status.
|
// Store the derived status.
|
||||||
setStatus (status);
|
setStatus (status);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user