diff --git a/module/kanban/control.php b/module/kanban/control.php index e2f7b7c668..0fbe9aa3b8 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -677,7 +677,11 @@ class kanban extends control } else { + $column = $this->kanban->getColumnById($columnID); $this->kanban->delete(TABLE_KANBANCOLUMN, $columnID); + + if($column->parent) $this->kanban->processParentColumn($column); + die(js::reload('parent')); } } diff --git a/module/kanban/model.php b/module/kanban/model.php index a8c339cf93..02a267fadf 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -2841,6 +2841,25 @@ class kanbanModel extends model if(!dao::isError()) return common::createChanges($oldCard, $card); } + public function processParentColumn($column) + { + $firstColumnID = $this->dao->select('id')->from(TABLE_KANBANCOLUMN) + ->where('parent')->eq($column->parent) + ->andWhere('deleted')->eq('0') + ->andWhere('archived')->eq('0') + ->fetch('id'); + + $extendID = $firstColumnID ? $firstColumnID : $column->parent; + + $cells = $this->dao->select('*')->from(TABLE_KANBANCELL) + ->where('`column`')->eq($column->id) + ->fetchAll('id'); + + foreach($cells as $cell) + { + } + } + /** * Get space by id. *