* [task#147134,done,0.2h] refactor countDeliverable.

This commit is contained in:
sunguangming
2025-07-31 07:01:31 +00:00
parent 9555fc8673
commit 7aad61c776
3 changed files with 6 additions and 9 deletions
+1 -2
View File
@@ -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;
}
+3 -5
View File
@@ -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);
}
+2 -2
View File
@@ -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;
}