From 0b41fc7fc6664c1df92d4ebddfc5da75a875d39a Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 24 Jan 2022 09:58:25 +0800 Subject: [PATCH] * Fix bug #18851. --- module/action/model.php | 2 ++ module/common/model.php | 10 ++++++---- module/execution/model.php | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index deeab96961..c62c75ee4c 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -882,6 +882,8 @@ class actionModel extends model ->beginIF(!empty($executions))->andWhere('execution')->in(array_keys($executions))->fi() ->beginIF(is_numeric($executionID))->andWhere('execution')->eq($executionID)->fi() ->markRight(1) + /* Types excluded from Lite. */ + ->beginIF($this->config->vision == 'lite')->andWhere('objectType')->notin('product')->fi() ->beginIF($productID == 'notzero')->andWhere('product')->gt(0)->andWhere('product')->notlike('%,0,%')->fi() ->beginIF($projectID == 'notzero')->andWhere('project')->gt(0)->fi() ->beginIF($executionID == 'notzero')->andWhere('execution')->gt(0)->fi() diff --git a/module/common/model.php b/module/common/model.php index 3488cec3bf..8f9e8df0c5 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -537,7 +537,11 @@ class commonModel extends model $attr = "class='iframe' data-width='650px'"; break; case 'project': - if(!defined('TUTORIAL')) + if($config->vision == 'lite') + { + $params = "model=kanban"; + } + else if(!defined('TUTORIAL')) { $params = "programID=0©ProjectID=0&extra=from=global"; $createMethod = 'createGuide'; @@ -556,9 +560,7 @@ class commonModel extends model if(!$productID and $config->vision == 'lite') { $module = 'project'; - $params = "programID=0©ProjectID=0&extra=from=global"; - $createMethod = 'createGuide'; - $attr = 'data-toggle="modal"'; + $params = "model=kanban"; } else { diff --git a/module/execution/model.php b/module/execution/model.php index 0b2517bca7..dc4c9f2781 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1058,6 +1058,7 @@ class executionModel extends model /* Order by status's content whether or not done */ $executions = $this->dao->select('*, IF(INSTR("done,closed", status) < 2, 0, 1) AS isDone, INSTR("doing,wait,suspended,closed", status) AS sortStatus')->from(TABLE_EXECUTION) ->where('deleted')->eq(0) + ->andWhere('vision')->eq($this->config->vision) ->beginIF($type == 'all')->andWhere('type')->in('stage,sprint,kanban')->fi() ->beginIF($projectID and $this->config->systemMode == 'new')->andWhere('project')->eq($projectID)->fi() ->beginIF($type != 'all' and $this->config->systemMode == 'new')->andWhere('type')->eq($type)->fi()