* [refac bug #60779] Fix for move card.

This commit is contained in:
wangyidong
2025-03-24 11:14:55 +08:00
committed by 孙广明
parent 6aa5a18b0b
commit f5d7b074f0
2 changed files with 8 additions and 5 deletions
+4 -3
View File
@@ -3219,18 +3219,19 @@ class kanbanModel extends model
*/
public function moveCard(int $cardID, int $fromColID, int $toColID, int $fromLaneID, int $toLaneID, int $kanbanID = 0)
{
$groupBy = ($this->session->executionGroupBy && ($this->app->tab == 'execution' || $this->config->vision == 'lite')) ? $this->session->executionGroupBy : '';
$groupBy = ($this->session->execGroupBy && ($this->app->tab == 'execution' || $this->config->vision == 'lite')) ? $this->session->execGroupBy : '';
$fromCell = $this->dao->select('id,cards,lane')->from(TABLE_KANBANCELL)
->where('`column`')->eq($fromColID)
->beginIF(!$groupBy || $groupBy == 'default')->andWhere('lane')->eq($fromLaneID)->fi()
->beginIF((!$groupBy || $groupBy == 'default') && $fromLaneID)->andWhere('lane')->eq($fromLaneID)->fi()
->beginIF($groupBy && $groupBy != 'default')
->andWhere('type')->eq($this->session->executionLaneType)
->andWhere('type')->eq($this->session->execLaneType)
->andWhere('cards')->like("%,$cardID,%")
->fi()
->fetch();
if($groupBy && $groupBy != 'default') $fromLaneID = $toLaneID = $fromCell->lane;
if(empty($fromLaneID) && $fromCell) $fromLaneID = $toLaneID = $fromCell->lane;
$fromCells[$fromCell->id] = $fromCell;
/* Remove all cells with cardID in fromCell. */
+4 -2
View File
@@ -454,8 +454,10 @@ class upgrade extends control
$position = strpos($left, "\n");
if($position !== false) $log .= substr($left, 0, $position + 1);
}
$log = trim($log);
return print(json_encode(array('log' => str_replace("\n", "<br />", htmlspecialchars($log)) . ($log ? '<br />' : ''), 'progress' => $progress, 'offset' => $offset + strlen($log))));
$offset += strlen($log);
$log = trim($log);
return print(json_encode(array('log' => str_replace("\n", "<br />", htmlspecialchars($log)) . ($log ? '<br />' : ''), 'progress' => $progress, 'offset' => $offset)));
}
/**