Merge branch 'fixbug' into 'master'

* Fix bug #23908,23888.

See merge request easycorp/zentaopms!4016
This commit is contained in:
王怡栋
2022-06-20 03:18:37 +00:00
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -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;
+1 -1
View File
@@ -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)