From 09268cfe2319a530c9fd397b7f679911e455fc0c Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 20 Jun 2022 10:50:54 +0800 Subject: [PATCH] * Fix bug . --- extension/lite/kanban/ext/model/lite.php | 9 ++++++--- module/kanban/model.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extension/lite/kanban/ext/model/lite.php b/extension/lite/kanban/ext/model/lite.php index 4bf7cd4d85..f1628a9f41 100644 --- a/extension/lite/kanban/ext/model/lite.php +++ b/extension/lite/kanban/ext/model/lite.php @@ -49,6 +49,7 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu if(empty($column->cards)) continue; foreach($cardList as $card) { + if($card->assignedTo == '') $card->assignedTo = 0; if(strpos($column->cards, ",$card->id,") !== false) $cardGroup[$column->columnType][$card->id] = $card; } } @@ -66,12 +67,13 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu $laneData['name'] = (($groupBy == 'pri' or $groupBy == 'severity') and $laneID) ? $this->lang->$browseType->$groupBy . ':' . $lane->name : $lane->name; $laneData['color'] = $lane->color; $laneData['order'] = $lane->order; + $laneData['type'] = $browseType; $laneData['defaultCardType'] = $browseType; /* Construct kanban column data. */ foreach($columns as $column) { - $columnID = $column->column; + $columnID = $column->columnType; $columnName = $column->columnName; $parentColumn = ''; if(in_array($columnID, array('testing', 'tested'))) $parentColumn = 'test'; @@ -84,7 +86,7 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu if($this->isClickable($column, $action)) $column->actions[] = $action; } - $columnData[$columnID]['id'] = $columnID; + $columnData[$columnID]['id'] = $column->column; $columnData[$columnID]['type'] = $columnID; $columnData[$columnID]['name'] = $columnName; $columnData[$columnID]['color'] = '#333'; @@ -101,8 +103,9 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu if(empty($object)) continue; $cardData = array(); + if(in_array($groupBy, array('module', 'story', 'pri', 'severity')) and (int)$object->$groupBy !== $laneID) continue; - if(in_array($groupBy, array('assignedTo', 'type', 'category', 'source')) and $object->$groupBy != $laneID) continue; + if(in_array($groupBy, array('assignedTo', 'type', 'category', 'source')) and $object->$groupBy !== $laneID) continue; $cardData['id'] = $object->id; $cardData['order'] = $cardOrder; diff --git a/module/kanban/model.php b/module/kanban/model.php index 27ba63b966..fee93f143d 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -3185,7 +3185,7 @@ class kanbanModel extends model */ public function moveCard($cardID, $fromColID, $toColID, $fromLaneID, $toLaneID, $kanbanID = 0) { - $groupBy = ($this->session->execGroupBy and $this->app->tab == 'execution') ? $this->session->execGroupBy : ''; + $groupBy = ($this->session->execGroupBy and ($this->app->tab == 'execution' or $this->config->vision == 'lite')) ? $this->session->execGroupBy : ''; $fromCell = $this->dao->select('cards, lane')->from(TABLE_KANBANCELL) ->where('`column`')->eq($fromColID)