diff --git a/module/execution/control.php b/module/execution/control.php index 153deec30c..a59b74b8e8 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2633,25 +2633,10 @@ class execution extends control $this->session->set('execGroupBy', $groupBy); $this->session->set('storyList', $this->app->getURI(true), 'execution'); $this->session->set('rdSearchValue', ''); - - $features = $this->execution->getExecutionFeatures($execution); - $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy); - - /* Set lane type. */ - if(!$features['story'] and !$features['qa']) $browseType = 'task'; $this->session->set('execLaneType', $browseType); - /* Remove lanes if no feature. */ - foreach($kanbanData as $regionID => $region) - { - foreach($region->groups as $groupID => $group) - { - if(!$features['story'] and $group->lanes[0]->type == 'story') unset($kanbanData[$regionID]->groups[$groupID]); - if(!$features['qa'] and $group->lanes[0]->type == 'bug') unset($kanbanData[$regionID]->groups[$groupID]); - } - $kanbanData[$regionID]->groups = array_values($kanbanData[$regionID]->groups); - } - + $features = $this->execution->getExecutionFeatures($execution); + $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy); $executionActions = array(); foreach($this->config->execution->statusActions as $action) { diff --git a/module/kanban/model.php b/module/kanban/model.php index 570468ead2..c7c9db3a13 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -927,6 +927,7 @@ class kanbanModel extends model $laneGroup = $this->getLaneGroupByRegions($regionIDList, $browseType); $columnGroup = $this->getRDColumnGroupByRegions($regionIDList, array_keys($laneGroup)); $cardGroup = $this->getCardGroupByExecution($executionID, $browseType, $orderBy, $searchValue); + $execution = $this->loadModel('execution')->getByID($executionID); foreach($regions as $regionID => $regionName) { @@ -943,6 +944,8 @@ class kanbanModel extends model foreach($lanes as $key => $lane) { + if(in_array($execution->attribute, array('request', 'design', 'review')) and $lane->type == 'bug') continue 2; + if(in_array($execution->attribute, array('request', 'review')) and $lane->type == 'story') continue 2; $this->refreshCards($lane); $lane->items = isset($cardGroup[$lane->id]) ? $cardGroup[$lane->id] : array(); $lane->defaultCardType = $lane->type;