From 0256e443dd3b471813eda0db352b3db5dc4d6fd7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 25 Jan 2024 15:09:32 +0800 Subject: [PATCH] * Fix bug #45145. --- module/project/config/dtable.php | 7 +++++++ module/project/lang/de.php | 3 ++- module/project/lang/en.php | 3 ++- module/project/lang/fr.php | 3 ++- module/project/lang/zh-cn.php | 3 ++- module/project/zen.php | 7 +++++-- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/module/project/config/dtable.php b/module/project/config/dtable.php index 2047e1c075..b3079542d0 100755 --- a/module/project/config/dtable.php +++ b/module/project/config/dtable.php @@ -53,6 +53,13 @@ $config->project->dtable->fieldList['PM']['sortType'] = true; $config->project->dtable->fieldList['PM']['group'] = 3; $config->project->dtable->fieldList['PM']['required'] = true; +$config->project->dtable->fieldList['storyPoints']['title'] = $lang->project->storyPoints; +$config->project->dtable->fieldList['storyPoints']['type'] = 'number'; +$config->project->dtable->fieldList['storyPoints']['group'] = 4; +$config->project->dtable->fieldList['storyPoints']['show'] = true; +$config->project->dtable->fieldList['storyPoints']['width'] = '120px'; +$config->project->dtable->fieldList['storyPoints']['sortType'] = false; + $config->project->dtable->fieldList['storyCount']['title'] = $lang->project->storyCount; $config->project->dtable->fieldList['storyCount']['type'] = 'number'; $config->project->dtable->fieldList['storyCount']['group'] = 4; diff --git a/module/project/lang/de.php b/module/project/lang/de.php index 365400d487..10ef663be2 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -76,7 +76,8 @@ $lang->project->manageRepo = 'Manage Repo'; $lang->project->linkedRepo = 'Link Repo'; $lang->project->unlinkedRepo = 'Unlink Repo'; $lang->project->executionCount = 'Total Executions'; -$lang->project->storyCount = 'Story Points'; +$lang->project->storyCount = 'Story Count'; +$lang->project->storyPoints = 'Story Points'; $lang->project->invested = 'Invested'; $lang->project->member = 'Member'; $lang->project->manage = 'Manage'; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 56e4cd8507..00aa92c39c 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -76,7 +76,8 @@ $lang->project->manageRepo = 'Manage Repo'; $lang->project->linkedRepo = 'Link Repo'; $lang->project->unlinkedRepo = 'Unlink Repo'; $lang->project->executionCount = 'Total Executions'; -$lang->project->storyCount = 'Story Points'; +$lang->project->storyCount = 'Story Count'; +$lang->project->storyPoints = 'Story Points'; $lang->project->invested = 'Invested'; $lang->project->member = 'Member'; $lang->project->manage = 'Manage'; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index 7dcfa66ddc..5cb2cdbb95 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -76,7 +76,8 @@ $lang->project->manageRepo = 'Manage Repo'; $lang->project->linkedRepo = 'Link Repo'; $lang->project->unlinkedRepo = 'Unlink Repo'; $lang->project->executionCount = 'Total Executions'; -$lang->project->storyCount = 'Story Points'; +$lang->project->storyCount = 'Story Count'; +$lang->project->storyPoints = 'Story Points'; $lang->project->invested = 'Invested'; $lang->project->member = 'Member'; $lang->project->manage = 'Manage'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 7c1e34bc20..1d556a0235 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -77,7 +77,8 @@ $lang->project->manageRepo = '关联代码库'; $lang->project->linkedRepo = '已关联代码库'; $lang->project->unlinkedRepo = '未关联代码库'; $lang->project->executionCount = '执行数'; -$lang->project->storyCount = '需求规模'; +$lang->project->storyCount = '需求条目数'; +$lang->project->storyPoints = '需求规模'; $lang->project->invested = '已投入'; $lang->project->member = '成员'; $lang->project->manage = '管理'; diff --git a/module/project/zen.php b/module/project/zen.php index 292ffb5b80..91452a13c9 100755 --- a/module/project/zen.php +++ b/module/project/zen.php @@ -1246,8 +1246,11 @@ class projectZen extends project { $project = $this->project->formatDataForList($project, $userList); - $projectStories = $this->story->getExecutionStoryPairs($project->id); - $project->storyCount = count($projectStories); + $projectStories = $this->story->getExecutionStories($project->id); + $project->storyCount = count($projectStories); + $project->storyPoints = 0; + foreach($projectStories as $story) $project->storyPoints += $story->estimate; + $project->storyPoints .= ' ' . $this->config->hourUnit; $executions = $this->execution->getStatData($project->id, 'all', 0, 0, false, 'skipParent'); $project->executionCount = count($executions);