* Adjust task page for chilrenTask.
This commit is contained in:
@@ -189,6 +189,18 @@ class project extends control
|
||||
/* Get tasks. */
|
||||
$tasks = $this->project->getTasks($productID, $projectID, $this->projects, $browseType, $queryID, $moduleID, $sort, $pager);
|
||||
|
||||
if($browseType != 'unclosed' and $browseType != 'all')
|
||||
{
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if(isset($task->children))
|
||||
{
|
||||
$task->children = true;
|
||||
unset($task->children);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('project', 'task', "projectID=$projectID&status=bySearch¶m=myQueryID");
|
||||
$this->config->project->search['onMenuBar'] = 'yes';
|
||||
|
||||
@@ -1269,7 +1269,7 @@ class taskModel extends model
|
||||
->leftJoin(TABLE_TEAM)->alias('t4')->on('t4.root = t1.id')
|
||||
->leftJoin(TABLE_MODULE)->alias('t5')->on('t1.module = t5.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->beginIF(!in_array($type, array('assignedtome', 'myinvolved')))->andWhere('t1.parent')->eq(0)->fi()
|
||||
->beginIF($type =='all' || is_array($type))->andWhere('t1.parent')->eq(0)->fi()
|
||||
->beginIF($type == 'myinvolved')
|
||||
->andWhere("((t4.`account` = '{$this->app->user->account}' AND t4.`type` = 'task') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')")
|
||||
->fi()
|
||||
|
||||
Reference in New Issue
Block a user