From a96fbf29aef55162fb53c6ce1a409c8fbcf7c503 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 3 Mar 2025 08:26:00 +0000 Subject: [PATCH] * [task#60206,done,0.2h] fix bug. --- module/execution/control.php | 4 ++++ module/kanban/model.php | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 09a18644ef..8d26994968 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1811,6 +1811,10 @@ class execution extends control unset($this->lang->kanban->type['bug']); unset($this->lang->kanban->type['parentStory']); } + elseif($execution->type == 'stage') + { + unset($this->lang->kanban->type['risk']); + } elseif(!$features['story']) { $browseType = 'task'; diff --git a/module/kanban/model.php b/module/kanban/model.php index 7a39ad3a8d..91458a45d2 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1475,7 +1475,11 @@ class kanbanModel extends model if($browseType == 'all' || $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 't1.`order`_desc', 'allStory'); if($browseType == 'all' || $browseType == 'bug') $objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'all' || $browseType == 'task') $objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id"); - if($geMax && ($browseType == 'all' || $browseType == 'risk')) $objectGroup['risk'] = $this->loadModel('risk')->getKanbanRisks($executionID); + + if($geMax && ($browseType == 'all' || $browseType == 'risk') && $execution->type != 'stage') + { + $objectGroup['risk'] = $this->loadModel('risk')->getKanbanRisks($executionID); + } /* Get objects cards menus. */ $menus = array(); @@ -1485,7 +1489,7 @@ class kanbanModel extends model $menus['story'] = $browseType == 'all' || $browseType == 'story' ? $this->getKanbanCardMenu($executionID, $objectGroup['story'], 'story') : array(); $menus['bug'] = $browseType == 'all' || $browseType == 'bug' ? $this->getKanbanCardMenu($executionID, $objectGroup['bug'], 'bug') : array(); $menus['task'] = $browseType == 'all' || $browseType == 'task' ? $this->getKanbanCardMenu($executionID, $objectGroup['task'], 'task') : array(); - $menus['risk'] = $geMax && ($browseType == 'all' || $browseType == 'risk') ? $this->getKanbanCardMenu($executionID, $objectGroup['risk'], 'risk') : array(); + $menus['risk'] = ($geMax && ($browseType == 'all' || $browseType == 'risk') && $execution->type != 'stage') ? $this->getKanbanCardMenu($executionID, $objectGroup['risk'], 'risk') : array(); /* 获取看板连线的fromKanbanID. */ $storyFromKanbanID = ''; @@ -1505,9 +1509,10 @@ class kanbanModel extends model { $laneType = $lane->type; if(in_array($laneType, array('epic', 'requirement')) && strpos($project->storyType, $laneType) === false) continue; + if($laneType == 'risk' && $execution->type == 'stage') continue; list($laneData, $columnData, $cardsData) = $this->buildExecutionGroup($lane, $columns, $objectGroup, $searchValue, $menus); - if($lane->type == 'risk' && in_array($this->config->edition, array('max', 'ipd'))) $cardsData = $this->appendRiskField($cardsData, $objectGroup['risk']); + if($lane->type == 'risk' && in_array($this->config->edition, array('max', 'ipd')) && $execution->type != 'stage') $cardsData = $this->appendRiskField($cardsData, $objectGroup['risk']); $kanbanID = 'group' . $lane->id;