diff --git a/module/task/control.php b/module/task/control.php index b9420c8141..f0f4df1091 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -95,9 +95,9 @@ class task extends control $this->dao->commit(); /* Update other data related to the task after it is created. */ - $columnID = isset($output['columnID']) ? (int)$output['columnID'] : 0; - $taskIdList = (array)$taskIdList; - $task->id = current($taskIdList); + $columnID = isset($output['columnID']) ? (int)$output['columnID'] : 0; + $taskIdList = (array)$taskIdList; + $taskData->id = current($taskIdList); $this->task->afterCreate($taskData, $taskIdList, $bugID, $todoID); $this->task->updateKanbanData($taskData->execution, $taskIdList, (int)$this->post->lane, $columnID); helper::setcookie('lastTaskModule', (int)$this->post->module); diff --git a/module/task/zen.php b/module/task/zen.php index 478797f5d4..384542b951 100644 --- a/module/task/zen.php +++ b/module/task/zen.php @@ -482,13 +482,13 @@ class taskZen extends task $team = !empty($this->post->team) ? array_filter($this->post->team) : array(); $task = form::data()->setDefault('execution', $executionID) ->setDefault('project', $execution->project) - ->setIF($this->post->estimate !== false, 'left', $this->post->estimate) + ->setIF($this->post->estimate, 'left', $this->post->estimate) ->setIF($this->post->story, 'storyVersion', isset($this->post->story) ? $this->loadModel('story')->getVersion($this->post->story) : 0) ->setIF(empty($this->post->multiple) || count($team) < 1, 'mode', '') ->setIF($this->task->isNoStoryExecution($execution), 'story', 0) ->setIF($this->post->assignedTo, 'assignedDate', helper::now()) - ->setIF(!$this->post->estStarted, 'estStarted', '') - ->setIF(!$this->post->deadline, 'deadline', '') + ->setIF(!$this->post->estStarted, 'estStarted', null) + ->setIF(!$this->post->deadline, 'deadline', null) ->get(); /* Processing image link. */