This commit is contained in:
滔哥
2017-12-01 16:25:02 +08:00
5 changed files with 15 additions and 31 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ $lang->bug->typeList['others'] = 'Other';
$lang->bug->statusList[''] = '';
$lang->bug->statusList['active'] = 'Active';
$lang->bug->statusList['resolved'] = 'Reolved';
$lang->bug->statusList['resolved'] = 'Resolved';
$lang->bug->statusList['closed'] = 'Closed';
$lang->bug->confirmedList[1] = 'Confirmed';
-1
View File
@@ -137,7 +137,6 @@ class project extends control
$products = $this->config->global->flow == 'onlyTask' ? array() : $this->loadModel('product')->getProductsByProject($projectID);
setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot);
if($this->cookie->preProjectID != $projectID)
{
$_COOKIE['moduleBrowseParam'] = $_COOKIE['productBrowseParam'] = 0;
+1 -13
View File
@@ -1191,9 +1191,6 @@ class task extends control
->beginIF($this->post->exportType == 'selected')->andWhere('t1.id')->in($this->cookie->checkedItem)->fi()
->orderBy($orderBy)->fetchAll('id');
$taskList = array_keys($tasks);
if(!empty($taskList)) $children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($taskList)->fetchGroup('parent');
foreach($tasks as $key => $task)
{
/* Compute task progress. */
@@ -1212,16 +1209,7 @@ class task extends control
$task->progress .= '%';
$tasks[$key] = $task;
if(isset($children[$task->id]))
{
foreach($children[$task->id] as $child)
{
$child->name = '[' . $taskLang->childrenAB . '] ' . $child->name;
$tasks[$child->id] = $child;
}
}
if($task->parent) $task->name = '[' . $taskLang->childrenAB . '] ' . $task->name;
}
}
else
+9 -14
View File
@@ -1216,7 +1216,6 @@ class taskModel extends model
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->andWhere('t1.parent')->eq(0)
->beginIF($productID)->andWhere('t2.product')->eq((int)$productID)->fi()
->beginIF($type == 'undone')->andWhere("(t1.status = 'wait' or t1.status ='doing')")->fi()
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
@@ -1225,26 +1224,22 @@ class taskModel extends model
->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi()
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
->orderBy($orderBy)
->orderBy('t1.`parent`,' . $orderBy)
->page($pager)
->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or $type == 'needconfirm') ? false : true);
$taskList = array_keys($tasks);
if(!empty($taskList))
$taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('task')->in($taskList)->fetchGroup('task');
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
foreach($tasks as $taskID => $task)
{
$children = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
->where('t1.parent')->in($taskList)
->andWhere('t1.deleted')->eq(0)
->orderBy('id_desc')
->fetchGroup('parent');
foreach($children as $key => $child) $tasks[$key]->children = $child;
$taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('task')->in($taskList)->fetchGroup('task');
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
if($task->parent and isset($tasks[$task->parent]))
{
$tasks[$task->parent]->children[] = $task;
unset($tasks[$taskID]);
}
}
if($tasks) return $this->processTasks($tasks);
+4 -2
View File
@@ -76,6 +76,7 @@
<legend><?php echo $lang->task->legendDesc;?></legend>
<div class='article-content'><?php echo $task->desc;?></div>
</fieldset>
<?php if($project->type != 'ops'):?>
<?php if($task->fromBug != 0):?>
<fieldset>
<legend><?php echo $lang->bug->steps;?></legend>
@@ -102,7 +103,8 @@
</div>
</fieldset>
<?php endif;?>
<?php if(!empty($task->children)):?>
<?php endif;?>
<?php if(!empty($task->children)):?>
<fieldset>
<legend><?php echo $this->lang->task->children;?></legend>
<table class='table table-hover table-data table-fixed'>
@@ -147,7 +149,7 @@
<?php endforeach;?>
</table>
</fieldset>
<?php endif;?>
<?php endif;?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
<?php include '../../common/view/action.html.php';?>
<div class='actions'> <?php if(!$task->deleted) echo $actionLinks;?></div>