From 66c2768b6ac3f313581a3f050454f77c0aa1e7ed Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Wed, 8 Dec 2021 11:30:02 +0800 Subject: [PATCH 1/2] *Finish task #45535. --- module/execution/model.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 56e0a41dcd..2fb5f3ae08 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2555,11 +2555,14 @@ 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('project_asc') + ->orderBy('openedDate_desc') ->fetchPairs(); return $objectPairs; From ac9d06cf7cbd0bc05269e6d297858cab40619d67 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Fri, 10 Dec 2021 11:05:11 +0800 Subject: [PATCH 2/2] *Finish task #45539. --- module/execution/model.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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;