diff --git a/module/execution/model.php b/module/execution/model.php index 2fb5f3ae08..3916b1103c 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2555,14 +2555,11 @@ class executionModel extends model if(empty($projectID) and $this->config->systemMode == 'new') return array(); $objectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT) - ->where('deleted')->eq(0) - ->andWhere('id')->eq($projectID) - ->fetchPairs(); - $objectPairs += $this->dao->select('id,name')->from(TABLE_PROJECT) ->where('deleted')->eq(0) ->andWhere('(project')->eq($projectID) + ->orWhere('id')->eq($projectID) ->markRight(1) - ->orderBy('openedDate_desc') + ->orderBy('type_asc,openedDate_desc') ->fetchPairs(); return $objectPairs;