This commit is contained in:
tianshujie98
2021-01-18 10:17:08 +08:00
6 changed files with 28 additions and 14 deletions

View File

@@ -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();

View File

@@ -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';

View File

@@ -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 "<td class='c-name " . $class . "' $title>";
switch($id)
{
@@ -1699,10 +1702,10 @@ class programModel extends model
echo $project->teamCount;
break;
case 'PRJEstimate':
echo $project->hours->totalEstimate;
echo $project->hours->totalEstimate . ' ' . $this->config->hourUnit;
break;
case 'PRJConsume':
echo $project->hours->totalConsumed;
echo $project->hours->totalConsumed . ' ' . $this->config->hourUnit;
break;
case 'PRJSurplus':
echo $project->hours->totalLeft;

View File

@@ -2392,7 +2392,7 @@ class storyModel extends model
$branches = array();
foreach($stories as $story)
{
$story->estimate .= ' ' . $this->lang->story->hour;
$story->estimate .= ' ' . $this->config->hourUnit;
if(empty($story->branch) and $story->productType != 'normal') $branches[$story->productBranch][$story->id] = $story->id;
}
foreach($branches as $branchID => $storyIdList)
@@ -3310,6 +3310,10 @@ class storyModel extends model
$title = $story->sourceNote;
$class .= ' text-ellipsis';
}
else if($id == 'estimate')
{
$title = $story->estimate . ' ' . $this->config->hourUnit;
}
else if($id == 'reviewedBy')
{
$reviewedBy = '';
@@ -3385,7 +3389,7 @@ class storyModel extends model
echo '</span>';
break;
case 'estimate':
echo $story->estimate . ' ' . $this->lang->story->hour;
echo $story->estimate . ' ' . $this->config->hourUnit;
break;
case 'stage':
if(isset($storyStages[$story->id]) and !empty($branches))

View File

@@ -87,7 +87,7 @@ $config->task->datatable->fieldList['consumed']['required'] = 'no';
$config->task->datatable->fieldList['left']['title'] = 'leftAB';
$config->task->datatable->fieldList['left']['fixed'] = 'no';
$config->task->datatable->fieldList['left']['width'] = '70';
$config->task->datatable->fieldList['left']['width'] = '80';
$config->task->datatable->fieldList['left']['required'] = 'no';
$config->task->datatable->fieldList['progress']['title'] = 'progressAB';

View File

@@ -2963,13 +2963,13 @@ class taskModel extends model
$storyChanged ? print("<span class='status-story status-changed'>{$this->lang->story->changed}</span>") : print("<span class='status-task status-{$task->status}'> " . $this->processStatus('task', $task) . "</span>");
break;
case 'estimate':
echo round($task->estimate, 1) . ' ' . $this->lang->hourCommon;
echo round($task->estimate, 1) . ' ' . $this->config->hourUnit;
break;
case 'consumed':
echo round($task->consumed, 1) . ' ' . $this->lang->hourCommon;
echo round($task->consumed, 1) . ' ' . $this->config->hourUnit;
break;
case 'left':
echo round($task->left, 1) . ' ' . $this->lang->hourCommon;
echo round($task->left, 1) . ' ' . $this->config->hourUnit;
break;
case 'progress':
echo "{$task->progress}%";