* Adjust project module code login.

This commit is contained in:
leiyong
2020-11-25 11:38:26 +08:00
parent e7f95cf57b
commit ab815789d1
3 changed files with 11 additions and 7 deletions
+3 -1
View File
@@ -838,10 +838,12 @@ class programModel extends model
->groupBy('PRJ')
->fetchAll('PRJ');
$this->app->loadClass('pager', $static = true);
foreach($projects as $projectID => $project)
{
$orderBy = $project->model == 'waterfall' ? 'path_asc,id_asc' : 'id_desc';
$project->executions = $this->project->getExecutionStats($projectID, $status, 0, 0, $itemCounts, $orderBy);
$pager = $project->model == 'waterfall' ? null : new pager(0, 1, 1);
$project->executions = $this->project->getExecutionStats($projectID, 'undone', 0, 0, 30, $orderBy, $pager);
$project->teamCount = isset($teams[$projectID]) ? $teams[$projectID]->count : 0;
$project->estimate = isset($estimates[$projectID]) ? $estimates[$projectID]->estimate : 0;
$project->parentName = $this->getPRJParentName($project->parent);