Merge branch release/21.7.8 of zentao/zentaopms (#13143)

This commit is contained in:
刘刚
2026-01-06 15:35:47 +08:00
committed by Gitfox
4 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -1031,6 +1031,7 @@ class bugModel extends model
if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy);
if(strpos($orderBy, 'severity_') !== false) $orderBy = str_replace('severity_', 'severityOrder_', $orderBy);
if(strpos($orderBy, 'status') !== false) $orderBy = str_replace('status', 'statusOrder', $orderBy);
$type = strtolower($type);
if($type == 'bysearch')
@@ -1051,7 +1052,7 @@ class bugModel extends model
$condition = "($condition)";
}
$bugs = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) AS priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) AS severityOrder")->from(TABLE_BUG)->alias('t1')
$bugs = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) AS priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) AS severityOrder, INSTR('active,resolved,closed,', t1.status) as statusOrder")->from(TABLE_BUG)->alias('t1')
->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module = t2.id')
->where('t1.deleted')->eq('0')
->beginIF(!empty($productID) && $branchID !== 'all')->andWhere('t1.branch')->eq($branchID)->fi()
+2 -1
View File
@@ -511,7 +511,8 @@ class taskTao extends taskModel
{
if(is_string($type)) $type = strtolower($type);
$orderBy = str_replace('pri_', 'priOrder_', $orderBy);
$fields = "DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder";
$orderBy = str_replace('status', 'statusOrder', $orderBy);
$fields = "DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, INSTR('wait,doing,done,pause,cancel,closed,', t1.status) as statusOrder";
($this->config->edition == 'max' or $this->config->edition == 'ipd') && $fields .= ', t5.name as designName, t5.version as latestDesignVersion';
$actionIDList = array();
+1 -1
View File
@@ -686,7 +686,7 @@ class taskTest
* @access public
* @return array
*/
public function updateTeamByEffortTest(int $effortID, object $record, int $taskID, ?object $task = null, string $lastDate): array
public function updateTeamByEffortTest(int $effortID, object $record, int $taskID, mix $task = null, string $lastDate): array
{
$task = $this->objectModel->getByID($taskID);
$currentTeam = $this->objectModel->getTeamByAccount($task->team);
+1 -1
View File
@@ -234,4 +234,4 @@ r($task->fetchExecutionTasksTest($executionIdList[2], $productIdList[0], $type[0
r($task->fetchExecutionTasksTest($executionIdList[2], $productIdList[0], $type[0], $modules[3], $orderBy[0], $count[0])) && p('2:name') && e('任务2'); // 测试获取执行ID 2 product 0 type all module array(2,8) orederBy 'status_asc, id_desc' 的任务
r($task->fetchExecutionTasksTest($executionIdList[2], $productIdList[0], $type[0], $modules[3], $orderBy[0], $count[1])) && p() && e('2'); // 测试获取执行ID 2 product 0 type all module array(2,8) orederBy 'status_asc, id_desc' 的任务数量
r($task->fetchExecutionTasksTest($executionIdList[2], $productIdList[0], $type[0], $modules[0], $orderBy[1], $count[0])) && p('20:name') && e('任务20'); // 测试获取执行ID 2 product 0 type all module 空 orederBy 'pri_desc' 的任务
r($task->fetchExecutionTasksTest($executionIdList[2], $productIdList[0], $type[0], $modules[0], $orderBy[1], $count[1])) && p() && e('10'); // 测试获取执行ID 2 product 0 type all module 空 orederBy 'pri_desc' 的任务数量
r($task->fetchExecutionTasksTest($executionIdList[2], $productIdList[0], $type[0], $modules[0], $orderBy[1], $count[1])) && p() && e('10'); // 测试获取执行ID 2 product 0 type all module 空 orederBy 'pri_desc' 的任务数量