diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php
index 6176e3fa87..a9bedf6c20 100644
--- a/module/custom/view/set.html.php
+++ b/module/custom/view/set.html.php
@@ -22,8 +22,8 @@ $itemRow = <<
|
-
-
+
+
|
EOT;
@@ -139,8 +139,8 @@ EOT;
-
-
+
+
|
diff --git a/module/project/model.php b/module/project/model.php
index 50742242dc..0deb04c9a4 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -1050,7 +1050,8 @@ class projectModel extends model
$query = $this->dao->select('t2.id, t2.name, t2.type, t1.branch, t1.plan')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')
->on('t1.product = t2.id')
- ->where('t1.project')->eq((int)$projectID);
+ ->where('t1.project')->eq((int)$projectID)
+ ->andWhere('t2.deleted')->eq(0);
if(!$withBranch) return $query->fetchPairs('id', 'name');
return $query->fetchAll('id');
}
diff --git a/module/task/model.php b/module/task/model.php
index a9fdea9fa6..7408186f43 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -329,7 +329,7 @@ class taskModel extends model
$status = 'cancel';
}
- $parentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetchAll();
+ $parentTask = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($parentID)->fetch();
if($status and $parentTask->status != $status)
{
$now = helper::now();
@@ -359,6 +359,7 @@ class taskModel extends model
$task->assignedDate = $now;
$task->closedBy = $this->app->user->account;
$task->closedDate = $now;
+ $task->closedReason = 'done';
}
if($status == 'doing')
@@ -369,6 +370,7 @@ class taskModel extends model
$task->finishedDate = '';
$task->closedBy = '';
$task->closedDate = '';
+ $task->closedReason = '';
}
$task->lastEditedBy = $this->app->user->account;
@@ -2175,7 +2177,7 @@ class taskModel extends model
break;
case 'name':
if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . ' ';
- if($task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' ';
+ if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' ';
if($child or !empty($task->parent)) echo '' . $this->lang->task->childrenAB . ' ';
if(!empty($task->team)) echo '' . $this->lang->task->multipleAB . ' ';
echo $canView ? html::a($taskLink, $task->name, null, "style='color: $task->color'") : "$task->name";
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index ab5780e094..f4f85e542e 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -206,7 +206,7 @@ class upgradeModel extends model
$this->changeTeamFields();
$this->moveData2Notify();
case '9_8':
- $this->fixFinishedBy();
+ $this->fixTaskFinishedInfo();
case '9_8_1':
$this->execSQL($this->getUpgradeFile('9.8.1'));
$this->fixTaskAssignedTo();
@@ -2099,7 +2099,7 @@ class upgradeModel extends model
* @access public
* @return bool
*/
- public function fixFinishedBy()
+ public function fixTaskFinishedInfo()
{
$stmt = $this->dao->select('t1.id as historID,t2.objectType,t2.objectID,t2.actor')->from(TABLE_HISTORY)->alias('t1')
->leftJoin(TABLE_ACTION)->alias('t2')->on('t1.action=t2.id')
@@ -2141,14 +2141,8 @@ class upgradeModel extends model
}
else
{
- if(!isset($needUpdateChildTasks[$task->parent]))
- {
- $needUpdateChildTasks[$task->parent] = array();
- }
- else
- {
- $needUpdateChildTasks[$task->parent][] = $task;
- }
+ if(!isset($needUpdateChildTasks[$task->parent])) $needUpdateChildTasks[$task->parent] = array();
+ $needUpdateChildTasks[$task->parent][$taskID] = $task;
}
}