* adjust code for task.

This commit is contained in:
wangyidong
2018-10-19 14:57:21 +08:00
parent 39215211b3
commit cf167ce697
9 changed files with 37 additions and 11 deletions
+1
View File
@@ -1424,6 +1424,7 @@ class task extends control
$this->view->allExportFields = $allExportFields;
$this->view->customExport = true;
$this->view->type = $type;
$this->display();
}
+14 -3
View File
@@ -672,7 +672,7 @@ class taskModel extends model
->batchCheckIF($task->closedReason == 'cancel', 'finishedBy, finishedDate', 'empty')
->where('id')->eq((int)$taskID)->exec();
if($oldTask->parent)
if($oldTask->parent > 0)
{
$this->updateParentStatus($taskID);
$this->computeBeginAndEnd($oldTask->parent);
@@ -1618,14 +1618,25 @@ class taskModel extends model
->leftjoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
->where('t1.deleted')->eq(0)
->beginIF($type == 'assignedTo')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type != 'all')->andWhere("t1.`$type`")->eq($account)->fi()
->beginIF($type == 'finishedBy')
->andWhere('t1.finishedby', 1)->eq($this->app->user->account)
->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%")
->markRight(1)
->fi()
->beginIF($type != 'all' and $type != 'finishedBy')->andWhere("t1.`$type`")->eq($account)->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
->page($pager)
->fetchAll();
->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task');
$taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in(array_keys($tasks))->andWhere('type')->eq('task')->fetchGroup('root');
if(!empty($taskTeam))
{
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
}
if($tasks) return $this->processTasks($tasks);
return array();
}
+1 -1
View File
@@ -87,7 +87,7 @@
<div class='detail'>
<div class='detail-title'><?php echo $lang->task->legendBasic;?></div>
<table class='table table-form'>
<?php if(empty($task->parent)):?>
<?php if($task->parent <= 0):?>
<tr>
<th class='w-80px'><?php echo $lang->task->project;?></th>
<td><?php echo html::select('project', $projects, $task->project, 'class="form-control chosen" onchange="loadAll(this.value)"');?></td>