* Fix activate parent task logic.

This commit is contained in:
Yagami
2019-10-14 09:27:21 +08:00
parent 1038f2a069
commit 06738da7b7
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -1502,6 +1502,7 @@ class taskModel extends model
}
$oldTask = $this->getById($taskID);
if($oldTask->parent == '-1') $this->config->task->activate->requiredFields = '';
$task = fixer::input('post')
->setIF(is_numeric($this->post->left), 'left', (float)$this->post->left)
->setDefault('left', 0)
@@ -1542,6 +1543,7 @@ class taskModel extends model
{
unset($task->left);
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('parent')->eq((int)$taskID)->exec();
$this->computeWorkingHours($taskID);
}
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
if(!dao::isError()) return common::createChanges($oldTask, $task);
+2
View File
@@ -31,6 +31,7 @@
<td class='w-p25-f'><?php echo html::select('assignedTo', $members, $task->finishedBy, "class='form-control chosen'");?></td>
<td></td>
</tr>
<?php if($task->parent != '-1'):?>
<tr>
<th><?php echo $lang->task->left;?></th>
<td>
@@ -40,6 +41,7 @@
</div>
</td>
</tr>
<?php endif;?>
<tr class='hide'>
<th><?php echo $lang->task->status;?></th>
<td><?php echo html::hidden('status', 'doing');?></td>