* fix bug.

This commit is contained in:
Your Name
2018-07-04 13:58:43 +08:00
parent a596142ec5
commit 58bf0c3e56
4 changed files with 12 additions and 1 deletions
+5
View File
@@ -822,6 +822,11 @@ class taskModel extends model
->setDefault('assignedDate', $now)
->remove('comment,showModule')
->get();
if($oldTask->status != 'done' and $oldTask->status != 'closed' and $task->left == 0)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->left);
return false;
}
if(!empty($oldTask->team))
{
+2
View File
@@ -39,10 +39,12 @@
<th class='w-80px'><?php echo empty($task->team) ? $lang->task->assign : $lang->task->transferTo;?></th>
<td class='w-p25-f'><?php echo html::select('assignedTo', $members, empty($task->team) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?></td><td></td>
</tr>
<?php if($task->status != 'done' and $task->status != 'closed'):?>
<tr>
<th><?php echo $lang->task->left;?></th>
<td><div class='input-group'><?php echo html::input('left', $task->left, "class='form-control' autocomplete='off'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control w-p98'");?></td>
+4 -1
View File
@@ -530,10 +530,13 @@ class todoModel extends model
*/
public function close($todoID)
{
$now = helper::now();
$this->dao->update(TABLE_TODO)
->set('status')->eq('closed')
->set('closedBy')->eq($this->app->user->account)
->set('closedDate')->eq(helper::now())
->set('closedDate')->eq($now)
->set('assignedTo')->eq('closed')
->set('assignedDate')->eq($now)
->where('id')->eq((int)$todoID)
->exec();
$this->loadModel('action')->create('todo', $todoID, 'closed', '', 'closed');
+1
View File
@@ -337,6 +337,7 @@ class upgradeModel extends model
case '9_8_3': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.3'));
case '10_0_alpha': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.alpha'));
case '10_0_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.beta'));
case '10_0': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0'));
}
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
}