diff --git a/module/my/model.php b/module/my/model.php index d003cface7..824fe94942 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -1233,6 +1233,7 @@ class myModel extends model $actions = $this->dao->select('objectType,objectID,actor,action,MAX(`date`) as `date`')->from(TABLE_ACTION) ->where('action')->eq('reviewed') ->andWhere('objectType')->in($objectType) + ->andWhere('actor')->eq($this->app->user->account) ->groupBy('objectType,objectID') ->orderBy($orderBy) ->page($pager) diff --git a/module/project/model.php b/module/project/model.php index 4378a63135..35915340f8 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -214,11 +214,11 @@ class projectModel extends model ->groupBy('t1.root') ->fetchAll('root'); - $condition = 't2.parent as project'; + $condition = 't2.project as project'; $estimates = $this->dao->select("$condition, sum(estimate) as estimate")->from(TABLE_TASK)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id') ->where('t1.parent')->lt(1) - ->andWhere('t2.parent')->in($projectIdList) + ->andWhere('t2.project')->in($projectIdList) ->andWhere('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->groupBy('project')