From 2ce5ef1d5b99208185eda2729cd05a6546303b2e Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 18 Jan 2021 10:13:34 +0800 Subject: [PATCH] * Fix story hour detail. --- framework/router.class.php | 15 +++++++++++---- module/program/config.php | 4 ++-- module/program/model.php | 7 +++++-- module/story/model.php | 8 ++++++-- module/task/config.php | 2 +- module/task/model.php | 6 +++--- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index 45e8d26e75..676fb8a0ca 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -152,10 +152,12 @@ class router extends baseRouter */ public function setCommonLang() { - if(!defined('ITERATION_KEY')) define('ITERATION_KEY', 0); - if(!defined('SPRINT_KEY')) define('SPRINT_KEY', 1); - if(!defined('STAGE_KEY')) define('STAGE_KEY', 2); - if(!defined('PRODUCT_KEY')) define('PRODUCT_KEY', 0); + if(!defined('ITERATION_KEY')) define('ITERATION_KEY', 0); + if(!defined('SPRINT_KEY')) define('SPRINT_KEY', 1); + if(!defined('STAGE_KEY')) define('STAGE_KEY', 2); + if(!defined('PRODUCT_KEY')) define('PRODUCT_KEY', 0); + if(!defined('STORYPOINT_KEY')) define('STORYPOINT_KEY', 1); + if(!defined('FUNCTIONPOINT_KEY')) define('FUNCTIONPOINT_KEY', 2); global $lang, $app; $sprintConcept = $hourPoint = false; @@ -188,6 +190,11 @@ class router extends baseRouter if($setting->key == 'URSR') $URSR = $setting->value; } + /* Record hour unit. */ + $config->hourUnit = 'H'; + if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'SP'; + if($hourKey == FUNCTIONPOINT_KEY) $config->hourUnit = 'FP'; + $model = new stdclass(); $model->model = 'scrum'; if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch(); diff --git a/module/program/config.php b/module/program/config.php index f870092a81..d19cbe3621 100644 --- a/module/program/config.php +++ b/module/program/config.php @@ -93,13 +93,13 @@ $config->program->datatable->fieldList['teamCount']['sort'] = 'no'; $config->program->datatable->fieldList['PRJEstimate']['title'] = 'PRJEstimate'; $config->program->datatable->fieldList['PRJEstimate']['fixed'] = 'no'; -$config->program->datatable->fieldList['PRJEstimate']['width'] = '50'; +$config->program->datatable->fieldList['PRJEstimate']['width'] = '70'; $config->program->datatable->fieldList['PRJEstimate']['required'] = 'no'; $config->program->datatable->fieldList['PRJEstimate']['sort'] = 'no'; $config->program->datatable->fieldList['PRJConsume']['title'] = 'PRJConsume'; $config->program->datatable->fieldList['PRJConsume']['fixed'] = 'no'; -$config->program->datatable->fieldList['PRJConsume']['width'] = '50'; +$config->program->datatable->fieldList['PRJConsume']['width'] = '70'; $config->program->datatable->fieldList['PRJConsume']['required'] = 'no'; $config->program->datatable->fieldList['PRJConsume']['sort'] = 'no'; diff --git a/module/program/model.php b/module/program/model.php index 6bd4441406..aebdd879d6 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1665,6 +1665,9 @@ class programModel extends model $title = "title='{$PRJProgram}'"; } + if($id == 'PRJEstimate') $title = "title={$project->hours->totalEstimate}{$this->config->hourUnit}"; + if($id == 'PRJConsume') $title = "title={$project->hours->totalConsumed}{$this->config->hourUnit}"; + echo "