* Finish task#61964

This commit is contained in:
zenggang
2022-07-26 06:03:35 +00:00
parent 867f5467d9
commit 7973da34a6
7 changed files with 80 additions and 35 deletions
+5 -3
View File
@@ -185,9 +185,11 @@ class blockModel extends model
$data['tasks'] = isset($tasks->tasks) ? $tasks->tasks : 0;
$data['doneTasks'] = isset($tasks->doneTasks) ? $tasks->doneTasks : 0;
$data['bugs'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)
->where('assignedTo')->eq($this->app->user->account)
->andWhere('deleted')->eq(0)
$data['bugs'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on("t1.product = t2.id")
->where('t1.assignedTo')->eq($this->app->user->account)
->andWhere('t1.deleted')->eq(0)
->andWhere('t2.deleted')->eq(0)
->fetch('count');
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')