From 3a6f2986ab780374809d678c0becec4aafdcbb5f Mon Sep 17 00:00:00 2001 From: liuhong Date: Thu, 2 Feb 2023 05:54:47 +0000 Subject: [PATCH 1/8] * Fix bug #30389.* Fix bug #30389.* Fix bug #30389.* Fix bug #30389.* Fix bug #30389.* Fix bug #30389.* Fix bug #30389.* Fix bug #30389. --- module/bug/control.php | 2 +- module/bug/model.php | 28 ++++++++++++++-------------- module/bug/view/view.html.php | 2 +- module/execution/model.php | 5 +++-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 827fc78166..ac7f41626a 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1175,7 +1175,7 @@ class bug extends control $this->view->projectExecutionPairs = $this->loadModel('project')->getProjectExecutionPairs(); $this->view->moduleOptionMenu = $moduleOptionMenu; $this->view->currentModuleID = $currentModuleID; - $this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project); + $this->view->executions = array(0 => '', $execution->id => $execution->name) + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project); $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false); $this->view->branchOption = $branchOption; $this->view->branchTagOption = $branchTagOption; diff --git a/module/bug/model.php b/module/bug/model.php index c61ccf0179..a6d781604c 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -490,7 +490,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->eq($branch)->fi() ->beginIF(!empty($moduleIdList))->andWhere('module')->in($moduleIdList)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2638,7 +2638,7 @@ class bugModel extends model $bugs = $this->dao->select("t1.*, t2.title as planTitle, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') ->where('t1.product')->in($productIDList) - ->andWhere('t1.execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() @@ -2672,7 +2672,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2699,7 +2699,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2726,7 +2726,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2754,7 +2754,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2777,7 +2777,7 @@ class bugModel extends model { return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->andWhere('confirmed')->eq(0) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() @@ -2805,7 +2805,7 @@ class bugModel extends model { return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2835,7 +2835,7 @@ class bugModel extends model { return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($status == 'unclosed')->andWhere('status')->ne('closed')->fi() @@ -2867,7 +2867,7 @@ class bugModel extends model return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('lastEditedDate')->lt($lastEditedDate) ->andWhere('product')->in($productIDList) - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2898,7 +2898,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2926,8 +2926,8 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('t1.branch')->in($branch)->fi() ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('t2.version > t1.storyVersion') - ->andWhere('t1.execution')->in(array_keys($executions)) ->andWhere('t1.deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy) @@ -2956,7 +2956,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->andWhere('execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->andWhere('status')->ne('closed') ->andWhere('id')->in($actionIDList) @@ -3074,7 +3074,7 @@ class bugModel extends model $bugs = $this->dao->select("t1.*, t2.title as planTitle, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') ->where('t1.product')->in($productIDList) - ->andWhere('t1.execution')->in(array_keys($executions)) + ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index d4441262f3..983552dce9 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -285,7 +285,7 @@ multiple)):?> model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?> - execution) echo html::a($this->createLink('execution', 'browse', "executionID=$bug->execution"), $bug->executionName);?> + execution) echo html::a($this->createLink('execution', 'view', "executionID=$bug->execution"), $bug->executionName);?> diff --git a/module/execution/model.php b/module/execution/model.php index 4e7f718631..81b20dba5f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -280,11 +280,11 @@ class executionModel extends model if($executionID == 0 and $this->session->execution) $executionID = $this->session->execution; if($executionID == 0) $executionID = key($executions); - $this->session->set('execution', (int)$executionID, $this->app->tab); + $this->session->set('execution', key($executions), $this->app->tab); if(!isset($executions[$executionID])) { - $this->session->set('execution', key($executions), $this->app->tab); + $this->session->set('execution', (int)$executionID, $this->app->tab); if($executionID) { @@ -1287,6 +1287,7 @@ class executionModel extends model $currentExecutionName = $this->lang->execution->common; if($executionID) { + $executionID = $executionID == $this->get->executionID ? $executionID : $this->get->executionID; $currentExecution = $this->getById($executionID); $currentExecutionName = $currentExecution->name; From 1fc15bd326d26638228445da80ae675cc9760c8a Mon Sep 17 00:00:00 2001 From: liuhong Date: Thu, 2 Feb 2023 07:14:17 +0000 Subject: [PATCH 2/8] * Adjust code for 30389. --- module/execution/model.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 81b20dba5f..1598dcbce7 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -280,12 +280,10 @@ class executionModel extends model if($executionID == 0 and $this->session->execution) $executionID = $this->session->execution; if($executionID == 0) $executionID = key($executions); - $this->session->set('execution', key($executions), $this->app->tab); + $this->session->set('execution', (int)$executionID, $this->app->tab); if(!isset($executions[$executionID])) { - $this->session->set('execution', (int)$executionID, $this->app->tab); - if($executionID) { $execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->andWhere('type')->in('sprint,stage,kanban')->fetch(); From d9cb8817e3b4e0451f47bc70c2bfee18053dfff9 Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 3 Feb 2023 01:50:17 +0000 Subject: [PATCH 3/8] * Adjuct code for 30389. --- module/bug/control.php | 2 +- module/bug/view/view.html.php | 2 +- module/execution/model.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index ac7f41626a..827fc78166 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1175,7 +1175,7 @@ class bug extends control $this->view->projectExecutionPairs = $this->loadModel('project')->getProjectExecutionPairs(); $this->view->moduleOptionMenu = $moduleOptionMenu; $this->view->currentModuleID = $currentModuleID; - $this->view->executions = array(0 => '', $execution->id => $execution->name) + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project); + $this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project); $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false); $this->view->branchOption = $branchOption; $this->view->branchTagOption = $branchTagOption; diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 983552dce9..d4441262f3 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -285,7 +285,7 @@ multiple)):?> model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?> - execution) echo html::a($this->createLink('execution', 'view', "executionID=$bug->execution"), $bug->executionName);?> + execution) echo html::a($this->createLink('execution', 'browse', "executionID=$bug->execution"), $bug->executionName);?> diff --git a/module/execution/model.php b/module/execution/model.php index 1598dcbce7..0f7a197fe1 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -286,6 +286,8 @@ class executionModel extends model { if($executionID) { + $this->session->set('execution', key($executions), $this->app->tab); + $execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->andWhere('type')->in('sprint,stage,kanban')->fetch(); if(empty($execution)) return js::error($this->lang->notFound); if(strpos(",{$this->app->user->view->sprints},", ",{$executionID},") === false) $this->accessDenied(); @@ -1285,7 +1287,6 @@ class executionModel extends model $currentExecutionName = $this->lang->execution->common; if($executionID) { - $executionID = $executionID == $this->get->executionID ? $executionID : $this->get->executionID; $currentExecution = $this->getById($executionID); $currentExecutionName = $currentExecution->name; From a1cbb18b669021d25e90abc949469f24a3c023c1 Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 3 Feb 2023 01:51:32 +0000 Subject: [PATCH 4/8] * Adjust code for 30389. --- module/execution/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 0f7a197fe1..4e7f718631 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -284,10 +284,10 @@ class executionModel extends model if(!isset($executions[$executionID])) { + $this->session->set('execution', key($executions), $this->app->tab); + if($executionID) { - $this->session->set('execution', key($executions), $this->app->tab); - $execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->andWhere('type')->in('sprint,stage,kanban')->fetch(); if(empty($execution)) return js::error($this->lang->notFound); if(strpos(",{$this->app->user->view->sprints},", ",{$executionID},") === false) $this->accessDenied(); From 3d24c6980fb2f831628aa49304c0cebd22deb4dc Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 3 Feb 2023 07:33:01 +0000 Subject: [PATCH 5/8] * Adjust code for 30389. --- module/bug/model.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index a6d781604c..44004be508 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -490,7 +490,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->eq($branch)->fi() ->beginIF(!empty($moduleIdList))->andWhere('module')->in($moduleIdList)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2672,7 +2672,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2699,7 +2699,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2726,7 +2726,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2754,7 +2754,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2777,7 +2777,7 @@ class bugModel extends model { return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->andWhere('confirmed')->eq(0) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() @@ -2805,7 +2805,7 @@ class bugModel extends model { return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2835,7 +2835,7 @@ class bugModel extends model { return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($status == 'unclosed')->andWhere('status')->ne('closed')->fi() @@ -2867,7 +2867,7 @@ class bugModel extends model return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('lastEditedDate')->lt($lastEditedDate) ->andWhere('product')->in($productIDList) - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2898,7 +2898,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->orderBy($orderBy)->page($pager)->fetchAll(); @@ -2956,7 +2956,7 @@ class bugModel extends model ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->beginIF($this->app->tab !== 'qa')->andWhere('t1.execution')->in(array_keys($executions))->fi() + ->beginIF($this->app->tab !== 'qa')->andWhere('execution')->in(array_keys($executions))->fi() ->andWhere('deleted')->eq(0) ->andWhere('status')->ne('closed') ->andWhere('id')->in($actionIDList) From b5df4726396126c7991e99e283779964136da995 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 3 Feb 2023 16:27:52 +0800 Subject: [PATCH 6/8] * Code for css in preference.html.php . --- module/my/view/preference.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/my/view/preference.html.php b/module/my/view/preference.html.php index a76d8430c8..0169c4c5a5 100755 --- a/module/my/view/preference.html.php +++ b/module/my/view/preference.html.php @@ -22,7 +22,7 @@
- + config->systemMode == 'ALM'):?> From 2ab3b9f8cb5a07c981259e3aef64302ad08a7dee Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 3 Feb 2023 16:59:43 +0800 Subject: [PATCH 7/8] * Code for bug#28270. --- module/story/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index b6e3480739..0286aa293e 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -6436,8 +6436,10 @@ class storyModel extends model */ public function getStoriesReviewer($productID = 0) { + $this->loadModel('user'); $product = $this->loadModel('product')->getByID($productID); - $reviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', ''); + $reviewers = $product->reviewer; + if(!$reviewers and $product->acl != 'open') $reviewers = $this->user->getProductViewListUsers($product, '', '', '', ''); return $this->user->getPairs('noclosed|nodeleted', '', 0, $reviewers); } From 9b2050098d4ced9a7b9870231b5fb9f5bdd9fe39 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 3 Feb 2023 17:17:39 +0800 Subject: [PATCH 8/8] * fix bug #29748. --- module/dev/config.php | 3 +++ module/dev/view/api.html.php | 1 + 2 files changed, 4 insertions(+) diff --git a/module/dev/config.php b/module/dev/config.php index 108c481640..697b172c04 100644 --- a/module/dev/config.php +++ b/module/dev/config.php @@ -240,3 +240,6 @@ $config->dev->postParams['testcase']['create']['steps'] = 'string'; $config->dev->postParams['testcase']['create']['expect'] = 'string'; $config->dev->postParams['testcase']['create']['mailto'] = 'string'; $config->dev->postParams['testcase']['create']['keywords'] = 'string'; + +$config->disableFeature = array(); +if(!helper::hasFeature('waterfall')) $config->disableFeature = array('design', 'stage', 'programplan', 'weekly', 'researchplan', 'researchreport', 'gapanalysis'); diff --git a/module/dev/view/api.html.php b/module/dev/view/api.html.php index c70cdb6eb1..de48267908 100644 --- a/module/dev/view/api.html.php +++ b/module/dev/view/api.html.php @@ -9,6 +9,7 @@
disableFeature and in_array($module, $config->disableFeature)) continue; $active = ($module == $selectedModule) ? 'active' : ''; $moduleName = zget($lang->dev->tableList, $module, $module); ?>
my->storyConcept;?>my->storyConcept;?>