Merge branch 'sprint/182_tianshujie_bug' into 'master'

Sprint/182 tianshujie bug

See merge request easycorp/zentaopms!1458
This commit is contained in:
孙广明
2022-01-18 02:03:09 +00:00
5 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
+5 -1
View File
@@ -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');
}
}
}
+2 -2
View File
@@ -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();
+1
View File
@@ -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;