diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index c70c94a946..3b6ecdf479 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -793,7 +793,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car } else if(toColType == 'developing') { - if((fromColType == 'pause' || fromColType == 'cancel' || fromColType == 'closed' || fromColType == 'developed') && priv.canActivateTask) + if((fromColType == 'pause' || fromColType == 'canceled' || fromColType == 'closed' || fromColType == 'developed') && priv.canActivateTask) { var link = createLink('task', 'activate', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true); showIframe = true; diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index b755eb2891..39c623e1fa 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -470,7 +470,7 @@ if(!window.kanbanDropRules) task: { 'wait': ['developing', 'developed', 'canceled', 'closed'], - 'developing': ['developed', 'pause'], + 'developing': ['developed', 'pause', 'canceled'], 'developed': ['canceled', 'closed'], 'pause': ['developing'], 'canceled': ['developing'], @@ -553,7 +553,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car } else if(toColType == 'developing') { - if((fromColType == 'pause' || fromColType == 'cancel' || fromColType == 'closed' || fromColType == 'developed') && priv.canActivateTask) + if((fromColType == 'pause' || fromColType == 'canceled' || fromColType == 'closed' || fromColType == 'developed') && priv.canActivateTask) { var link = createLink('task', 'activate', 'taskID=' + objectID, '', true); showIframe = true; diff --git a/module/kanban/model.php b/module/kanban/model.php index 94a93ee3f2..26476389d2 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -343,7 +343,6 @@ class kanbanModel extends model foreach($data->name as $i => $name) { $childColumn = new stdclass(); - $childColumn->lane = $column->lane; $childColumn->parent = $column->id; $childColumn->region = $column->region; $childColumn->group = $column->group; @@ -389,6 +388,11 @@ class kanbanModel extends model if($i == 1) $this->dao->update(TABLE_KANBANCARD)->set('`column`')->eq($childColumnID)->where('`column`')->eq($columnID)->exec(); $this->dao->update(TABLE_KANBANCOLUMN)->set('type')->eq("column{$childColumnID}")->where('id')->eq($childColumnID)->exec(); $this->action->create('kanbanColumn', $childColumnID, 'created'); + $cellList = $this->dao->select('*')->from(TABLE_KANBANCELL)->where('`column`')->eq($column->id)->fetchAll(); + foreach($cellList as $cell) + { + $this->addKanbanCell($cell->kanban, $cell->lane, $childColumnID, 'common'); + } } } diff --git a/module/story/model.php b/module/story/model.php index c7047949a6..388842e6a6 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1845,7 +1845,7 @@ class storyModel extends model $task = new stdclass(); $task->execution = $executionID; - $task->project = $projectID; + $task->project = $projectID ? $projectID : 0; $task->name = $story->title; $task->story = $story->id; $task->type = $data->type; @@ -2081,7 +2081,7 @@ class storyModel extends model /* Get current stage and set as default value. */ $currentStage = $story->stage; - $stage = $currentStage; + $stage = $currentStage; /* Cycle all tasks, get counts of every type and every status. */ $branchStatusList = array(); diff --git a/module/task/model.php b/module/task/model.php index b74aec64fe..8b9d059cbf 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1609,6 +1609,7 @@ class taskModel extends model if($task->parent > 0) $this->updateParentStatus($task->id); if($task->story) $this->loadModel('story')->setStage($task->story); + if(isset($data->status) and $task->status != $data->status) $this->loadModel('kanban')->updateLane($task->execution, 'task', $taskID); if($task->status == 'done' and !dao::isError()) $this->loadModel('score')->create('task', 'finish', $taskID); return $changes;