This commit is contained in:
liyuchun
2021-09-15 13:58:52 +08:00
parent fc887d625a
commit 4c0319296c
3 changed files with 6 additions and 7 deletions
+2 -3
View File
@@ -848,8 +848,7 @@ class taskModel extends model
$now = helper::now();
$task = fixer::input('post')
->setDefault('story, estimate, left, consumed', 0)
->setDefault('estStarted', '0000-00-00')
->setDefault('deadline', '0000-00-00')
->setDefault('realStarted', '0000-00-00 00:00:00')
->setIF(is_numeric($this->post->estimate), 'estimate', (float)$this->post->estimate)
->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed)
->setIF(is_numeric($this->post->left), 'left', (float)$this->post->left)
@@ -1922,7 +1921,7 @@ class taskModel extends model
if($task->assignedTo == 'closed') $task->assignedToRealName = 'Closed';
foreach($task as $key => $value)
{
if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $task->$key = '';
if((strpos($key, 'Date') !== false or strpos('estStarted|deadline', $key) !== false) and !(int)substr($value, 0, 4)) $task->$key = '';
}
$task->files = $this->loadModel('file')->getByObject('task', $taskID);