diff --git a/module/execution/model.php b/module/execution/model.php index b91becb588..9a3ac752f5 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1550,7 +1550,7 @@ class executionModel extends model */ public function getStatData($projectID = 0, $browseType = 'undone', $productID = 0, $branch = 0, $withTasks = false, $param = '', $orderBy = 'id_asc', $pager = null) { - if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectStats($browseType); + if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getExecutionStats($browseType); /* Construct the query SQL at search executions. */ $executionQuery = ''; diff --git a/module/tutorial/model.php b/module/tutorial/model.php index a8ba9edb7d..c03b2afd4d 100644 --- a/module/tutorial/model.php +++ b/module/tutorial/model.php @@ -166,6 +166,7 @@ class tutorialModel extends model $project->displayCards = 0; $project->fluidBoard = 0; $project->deleted = '0'; + $project->hasProduct = ''; return $project; } @@ -204,6 +205,31 @@ class tutorialModel extends model return $projectStat; } + /** + * Get execution stats for tutorial. + * + * @param string $browseType + * @access public + * @return array + */ + public function getExecutionStats($browseType = '') + { + $execution = $this->getProject(); + $emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0); + + $execution->hours = (object)$emptyHour; + $execution->leftTasks = '—'; + $execution->teamMembers = array_keys($this->getTeamMembers()); + $execution->teamCount = count($execution->teamMembers); + $execution->hasProduct = ''; + $execution->multiple = ''; + + if($browseType and $browseType != 'all') $execution->name .= '-' . $browseType; // Fix bug #21096 + + $executionStat[$execution->id] = $execution; + return $executionStat; + } + /** * Get tutorial stories. * @@ -320,6 +346,8 @@ class tutorialModel extends model $execution->fluidBoard = 0; $execution->hours = $hours; $execution->burns = array(35, 35); + $execution->hasProduct = ''; + $execution->multiple = ''; return $execution; }