* Fix bug#21097,21096

This commit is contained in:
zenggang
2022-03-31 01:35:50 +00:00
parent af5eb87896
commit 40f9a85a6f
5 changed files with 22 additions and 8 deletions

View File

@@ -178,10 +178,11 @@ class tutorialModel extends model
/**
* Get project stats for tutorial
*
* @param string $browseType
* @access public
* @return array
*/
public function getProjectStats()
public function getProjectStats($browseType = '')
{
$project = $this->getProject();
$emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0);
@@ -191,6 +192,8 @@ class tutorialModel extends model
$project->teamMembers = array_keys($this->getTeamMembers());
$project->teamCount = count($project->teamMembers);
if($browseType and $browseType != 'all') $project->name .= '-' . $browseType; // Fix bug #21096
$projectStat[$project->id] = $project;
return $projectStat;
}
@@ -300,6 +303,17 @@ class tutorialModel extends model
$execution->totalEstimate = 0;
$execution->displayCards = 0;
$execution->fluidBoard = 0;
/* Fix bug #21097. */
$hours = new stdclass();
$hours->totalEstimate = 52;
$hours->totalConsumed = 43;
$hours->totalLeft = 7;
$hours->progress = 86;
$hours->totalReal = 50;
$execution->hours = $hours;
$execution->burns = array(35, 35);
return $execution;
}