* Finish task#45157.

This commit is contained in:
liumengyi
2021-11-25 15:52:15 +08:00
parent a2f81d7d85
commit 26da1c72cb
2 changed files with 20 additions and 0 deletions
+19
View File
@@ -2158,6 +2158,24 @@ class taskModel extends model
$projectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($projectList)->fetchPairs('id');
foreach($tasks as $task) $task->projectName = zget($projectPairs, $task->project);
$suspendedLists = $this->dao->select('id')->from(TABLE_PROJECT)
->where('deleted')->eq(0)
->andWhere('status')->eq('suspended')
->andWhere('type')->in('project,sprint')
->fetchAll('id');
foreach($tasks as $task)
{
foreach($suspendedLists as $suspendedList)
{
if($task->project == $suspendedList->id || $task->execution == $suspendedList->id)
{
$task->isSuspened = 1;
break;
}
}
if(!isset($task->isSuspened)) $task->isSuspened = 0;
}
if($tasks) return $this->processTasks($tasks);
return array();
}
@@ -2478,6 +2496,7 @@ class taskModel extends model
}
}
}
return $tasks;
}