* [task#147134,done,0.2h] refactor countDeliverable.
This commit is contained in:
@@ -4932,14 +4932,13 @@ class executionModel extends model
|
||||
$execution->PMAvatar = zget($avatarList, $execution->PMAccount, '');
|
||||
}
|
||||
|
||||
if(in_array($this->config->edition, array('max', 'ipd'))) $execution->deliverable = $this->project->countDeliverable($execution, 'execution');
|
||||
|
||||
$rows[$execution->id] = $execution;
|
||||
|
||||
/* Append tasks and child stages. */
|
||||
if(!empty($execution->tasks)) $rows = $this->appendTasks($execution->tasks, $rows, $users, $avatarList, $canModify);
|
||||
}
|
||||
|
||||
if(in_array($this->config->edition, array('max', 'ipd'))) $rows = $this->project->countDeliverable($rows, 'execution');
|
||||
return $rows;
|
||||
}
|
||||
|
||||
|
||||
@@ -1394,13 +1394,11 @@ class projectZen extends project
|
||||
$project->consume = helper::formatHours($project->consume);
|
||||
$project->left = helper::formatHours($project->left);
|
||||
|
||||
/* 交付物提交进度。 */
|
||||
if(in_array($this->config->edition, array('max', 'ipd')))
|
||||
{
|
||||
$project->deliverable = $this->project->countDeliverable($project);
|
||||
}
|
||||
}
|
||||
|
||||
/* 交付物提交进度。 */
|
||||
if(in_array($this->config->edition, array('max', 'ipd'))) $projectList = $this->project->countDeliverable($projectList, 'project');
|
||||
|
||||
return array_values($projectList);
|
||||
}
|
||||
|
||||
|
||||
@@ -1318,10 +1318,10 @@ class userModel extends model
|
||||
$project->storyPoints = $projectStory ? round($projectStory->estimate, 1) : 0;
|
||||
$project->storyCount = $projectStory ? $projectStory->count : 0;
|
||||
$project->executionCount = zget($projectExecutionCount, $project->id, 0);
|
||||
|
||||
if(in_array($this->config->edition, array('max', 'ipd'))) $project->deliverable = $this->project->countDeliverable($project);
|
||||
}
|
||||
|
||||
if(in_array($this->config->edition, array('max', 'ipd'))) $projects = $this->project->countDeliverable($projects, 'project');
|
||||
|
||||
return $projects;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user