From 30da577b69d0b42e46bbbfb57953c3334b4db745 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 4 Mar 2025 06:53:16 +0000 Subject: [PATCH] * [bug#60194,done,0.5h] revert code. --- module/execution/control.php | 4 ---- module/execution/ui/taskkanban.html.php | 4 ++-- module/kanban/model.php | 11 +++-------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 8d26994968..09a18644ef 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1811,10 +1811,6 @@ 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/execution/ui/taskkanban.html.php b/module/execution/ui/taskkanban.html.php index c74969cb41..cf08889026 100644 --- a/module/execution/ui/taskkanban.html.php +++ b/module/execution/ui/taskkanban.html.php @@ -52,8 +52,8 @@ $checkObject->execution = $executionID; $canModifyExecution = common::canModify('execution', $execution); $canCreateTask = $canModifyExecution && !$isLimited && common::hasPriv('task', 'create', $checkObject); $canBatchCreateTask = $canModifyExecution && !$isLimited && common::hasPriv('task', 'batchCreate', $checkObject); -$canCreateRisk = $canModifyExecution && common::hasPriv('risk', 'create', $checkObject) && in_array($config->edition, array('max', 'ipd')) && $execution->type != 'stage'; -$canBatchCreateRisk = $canModifyExecution && common::hasPriv('risk', 'batchCreate', $checkObject) && in_array($config->edition, array('max', 'ipd')) && $execution->type != 'stage'; +$canCreateRisk = $canModifyExecution && common::hasPriv('risk', 'create', $checkObject) && in_array($config->edition, array('max', 'ipd')); +$canBatchCreateRisk = $canModifyExecution && common::hasPriv('risk', 'batchCreate', $checkObject) && in_array($config->edition, array('max', 'ipd')); $canCreateBug = ($canModifyExecution && $productID && common::hasPriv('bug', 'create')); $canBatchCreateBug = ($canModifyExecution && $productID && common::hasPriv('bug', 'batchCreate')); $canImportBug = ($canModifyExecution && $productID && !$isLimited && common::hasPriv('execution', 'importBug')); diff --git a/module/kanban/model.php b/module/kanban/model.php index c38b8649eb..9550b160f2 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1475,11 +1475,7 @@ 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') && $execution->type != 'stage') - { - $objectGroup['risk'] = $this->loadModel('risk')->getKanbanRisks($executionID); - } + if($geMax && ($browseType == 'all' || $browseType == 'risk')) $objectGroup['risk'] = $this->loadModel('risk')->getKanbanRisks($executionID); /* Get objects cards menus. */ $menus = array(); @@ -1489,7 +1485,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') && $execution->type != 'stage') ? $this->getKanbanCardMenu($executionID, $objectGroup['risk'], 'risk') : array(); + $menus['risk'] = ($geMax && ($browseType == 'all' || $browseType == 'risk')) ? $this->getKanbanCardMenu($executionID, $objectGroup['risk'], 'risk') : array(); /* 获取看板连线的fromKanbanID. */ $storyFromKanbanID = ''; @@ -1509,10 +1505,9 @@ 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')) && $execution->type != 'stage') $cardsData = $this->appendRiskField($cardsData, $objectGroup['risk']); + if($lane->type == 'risk' && in_array($this->config->edition, array('max', 'ipd'))) $cardsData = $this->appendRiskField($cardsData, $objectGroup['risk']); $kanbanID = 'group' . $lane->id;