* adjust for report api.

This commit is contained in:
王怡栋
2021-11-08 18:56:48 +08:00
parent 2225f9acb8
commit ad213ae93a
2 changed files with 9 additions and 3 deletions
+2 -3
View File
@@ -83,7 +83,7 @@ class reportsEntry extends entry
*/
public function projectOverview($accounts)
{
$statusOverview = $this->loadModel('report')->getProjectStatusOverview(array_keys($accounts));
$statusOverview = $this->loadModel('report')->getProjectStatusOverview($accounts);
$this->app->loadLang('project');
$total = 0;
@@ -116,8 +116,7 @@ class reportsEntry extends entry
*/
public function radar($accounts, $year)
{
$allAccounts = $this->loadModel('user')->getPairs('noletter|noclosed');
$contributions = $this->loadModel('report')->getUserYearContributions(empty($accounts) ? array_keys($allAccounts) : $accounts, $year);
$contributions = $this->loadModel('report')->getUserYearContributions($accounts, $year);
$annualDataConfig = $this->config->report->annualData;
$radarData = array('product' => 0, 'execution' => 0, 'devel' => 0, 'qa' => 0, 'other' => 0);
+7
View File
@@ -1124,6 +1124,13 @@ class reportModel extends model
$outputData['case']['createBug'] += 1;
}
$outputData['case']['run'] = $this->dao->select('count(*) as count')->from(TABLE_TESTRESULT)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id')
->where('LEFT(t1.date, 4)')->eq($year)
->andWhere('t2.deleted')->eq(0)
->beginIF($accounts)->andWhere('t1.lastRunner')->in($accounts)->fi()
->fetch('count');
$processedOutput = array();
foreach($this->config->report->outputData as $objectType => $actions)
{