diff --git a/module/block/model.php b/module/block/model.php index 510fcb22d9..9d03c407c0 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -174,7 +174,6 @@ class blockModel extends model ->orWhere('t3.status')->ne('suspended') ->markRight(1) ->andWhere('t1.deleted')->eq('0') - ->beginIF($this->config->systemMode == 'new')->andWhere('t2.deleted')->eq('0')->fi() ->andWhere('t3.deleted')->eq('0') ->fetchAll('id'); $data['tasks'] = isset($tasks) ? count($tasks) : 0; diff --git a/module/task/model.php b/module/task/model.php index a37b99ce6c..d347693c0f 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2188,14 +2188,13 @@ class taskModel extends model public function getUserTasks($account, $type = 'assignedTo', $limit = 0, $pager = null, $orderBy = "id_desc", $projectID = 0) { if(!$this->loadModel('common')->checkField(TABLE_TASK, $type)) return array(); - $noDeletedExecution = $this->loadModel('execution')->getPairs(); $tasks = $this->dao->select('t1.*, t2.id as executionID, t2.name as executionName, t3.id as storyID, t3.title as storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion') ->from(TABLE_TASK)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on("t1.execution = t2.id") ->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') ->leftJoin(TABLE_PROJECT)->alias('t4')->on("t1.project = t4.id") ->where('t1.deleted')->eq(0) - ->andWhere('t2.id')->in(array_keys($noDeletedExecution)) + ->andWhere('t2.deleted')->eq(0) ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() ->beginIF($type == 'finishedBy')