Merge branch 'zentaopms_9.8' of github.com:easysoft/zentaopms into zentaopms_9.8

This commit is contained in:
wumo
2018-03-23 04:12:09 +08:00
4 changed files with 14 additions and 17 deletions
+4 -4
View File
@@ -22,8 +22,8 @@ $itemRow = <<<EOT
<input type='text' class="form-control" autocomplete='off' value="" name="values[]">
</td>
<td class='text-left'>
<a href='javascript:void()' class='btn-icon' onclick='addItem(this)'><i class='icon-plus'></i></a>
<a href='javascript:void()' class='btn-icon' onclick='delItem(this)'><i class='icon-remove'></i></a>
<a href="javascript:void(0)" class='btn-icon' onclick="addItem(this)"><i class='icon-plus'></i></a>
<a href="javascript:void(0)" class='btn-icon' onclick="delItem(this)"><i class='icon-remove'></i></a>
</td>
</tr>
EOT;
@@ -139,8 +139,8 @@ EOT;
</td>
<?php if($canAdd):?>
<td class='text-left w-100px'>
<a href='javascript:void()' class='btn-icon' onclick='addItem(this)'><i class='icon-plus'></i></a>
<a href='javascript:void()' onclick='delItem(this)' class='btn-icon'><i class='icon-remove'></i></a>
<a href="javascript:void(0)" onclick="addItem(this)" class='btn-icon'><i class='icon-plus'></i></a>
<a href="javascript:void(0)" onclick="delItem(this)" class='btn-icon'><i class='icon-remove'></i></a>
</td>
<?php endif;?>
</tr>
+2 -1
View File
@@ -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');
}
+4 -2
View File
@@ -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 "<span class='label label-info label-badge'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
if($task->module and isset($modulePairs[$task->module])) echo "<span class='label label-info label-badge'>" . $modulePairs[$task->module] . '</span> ';
if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "<span class='label label-info label-badge'>" . $modulePairs[$task->module] . '</span> ';
if($child or !empty($task->parent)) echo '<span class="label">' . $this->lang->task->childrenAB . '</span> ';
if(!empty($task->team)) echo '<span class="label">' . $this->lang->task->multipleAB . '</span> ';
echo $canView ? html::a($taskLink, $task->name, null, "style='color: $task->color'") : "<span style='color: $task->color'>$task->name</span>";
+4 -10
View File
@@ -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;
}
}