* Finish task #116691.

This commit is contained in:
sunguangming
2024-04-22 17:13:15 +08:00
parent 31e674eed7
commit 3afabca134
2 changed files with 10 additions and 15 deletions
+9 -14
View File
@@ -518,15 +518,11 @@ class projectModel extends model
public function getStatData($projectID)
{
$executions = $this->loadModel('execution')->getPairs($projectID);
$storyTypeCount = $this->dao->select('count(t2.story) as storyCount,t1.type')->from(TABLE_STORY)->alias('t1')
$storyCount = $this->dao->select('count(t2.story) as storyCount')->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_PROJECTSTORY)->alias('t2')->on('t1.id = t2.story')
->where('t2.project')->eq($projectID)
->andWhere('t1.deleted')->eq(0)
->groupBy('t1.type')
->fetchPairs('type', 'storyCount');
$storyCount = isset($storyTypeCount['story']) ? $storyTypeCount['story'] : 0;
$requirementCount = isset($storyTypeCount['requirement']) ? $storyTypeCount['requirement'] : 0;
->fetch('storyCount');
$bugCount = $this->dao->select('count(id) as bugCount')->from(TABLE_BUG)
->where('project')->in($projectID)
@@ -550,14 +546,13 @@ class projectModel extends model
->fetch('count');
$statData = new stdclass();
$statData->storyCount = $storyCount;
$statData->requirementCount = $requirementCount;
$statData->bugCount = $bugCount;
$statData->taskCount = $taskCount->count;
$statData->waitCount = $taskCount->waitCount;
$statData->doingCount = $taskCount->doingCount;
$statData->finishedCount = $taskCount->finishedCount;
$statData->delayedCount = $delayedCount;
$statData->storyCount = $storyCount;
$statData->bugCount = $bugCount;
$statData->taskCount = $taskCount->count;
$statData->waitCount = $taskCount->waitCount;
$statData->doingCount = $taskCount->doingCount;
$statData->finishedCount = $taskCount->finishedCount;
$statData->delayedCount = $delayedCount;
return $statData;
}
+1 -1
View File
@@ -267,7 +267,7 @@ div
span
(
setClass('text-gray'),
$lang->story->common
$lang->common->story
)
),
div