diff --git a/module/execution/model.php b/module/execution/model.php index a03a8b24e7..75033fecd8 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -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; } diff --git a/module/project/zen.php b/module/project/zen.php index 7de79895d0..5f62f3374d 100755 --- a/module/project/zen.php +++ b/module/project/zen.php @@ -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); } diff --git a/module/user/model.php b/module/user/model.php index 72a4d78023..44685f65cb 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -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; }