* InfoLog/CalDAV: set status of new tasks to NEEDS-ACTION (not started), if client does not specify a status or completion (was set to DONE before)

This commit is contained in:
Ralf Becker 2012-06-05 15:19:11 +00:00
parent 1f4a92672d
commit 24373c34be

View File

@ -675,6 +675,11 @@ class infolog_ical extends infolog_bo
}
if ($this->log) error_log(__METHOD__."() setting STATUS='$status' and PERCENT-COMPLETE=$percent_completed from COMPLETED and X-INFOLOG-STATUS='$x_infolog_status'\n",3,$this->logfile);
}
// new task without status --> set a default status of NEEDS-ACTION, as otherwise task is marked closed
elseif($_taskID <= 0 && !is_scalar($x_infolog_status) && !is_scalar($completed))
{
$component->setAttribute('STATUS', 'NEEDS-ACTION');
}
else
{
if ($this->log) error_log(__METHOD__."() no STATUS, X-INFOLOG-STATUS='$x_infolog_status', COMPLETED".(is_scalar($completed)?'='.$completed:' not set')." --> leaving status and percent unchanged",3,$this->logfile);