From 69bac81a9d3319f1c147af95086047c09b95d78c Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 24 Mar 2022 11:01:00 +0800 Subject: [PATCH 1/3] * Fix bug #17395. --- module/project/view/kanban.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/kanban.html.php b/module/project/view/kanban.html.php index 53a2175d76..661a1f40a1 100644 --- a/module/project/view/kanban.html.php +++ b/module/project/view/kanban.html.php @@ -11,6 +11,7 @@ ?> +

project->empty;?>

@@ -40,7 +41,6 @@ $userPrivs['project'] = common::hasPriv('project', 'index'); $userPrivs['execution'] = common::hasPriv('execution', 'task'); js::set('kanbanColumns', array_values($kanbanColumns)); js::set('userPrivs', $userPrivs); -js::set('kanbanGroup', $kanbanGroup); js::set('latestExecutions', $latestExecutions); js::set('programPairs', $programPairs); js::set('doingText', $lang->project->statusList['doing']); From c9c1573a2d973e562f525f2b8fa06ec41d6224a6 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 24 Mar 2022 14:40:38 +0800 Subject: [PATCH 2/3] * Fix bug #20523. --- module/story/model.php | 15 +++++++++++++++ module/task/control.php | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 4db7db0cba..b56c3cd22d 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -927,6 +927,21 @@ class storyModel extends model if(empty($oldStory->plan) or empty($story->plan)) $this->setStage($storyID); // Set new stage for this story. } + if($oldStory->stage != $story->stage) + { + $executionIdList = $this->dao->select('t1.project')->from(TABLE_PROJECTSTORY)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') + ->where('t1.story')->eq($storyID) + ->andWhere('t2.deleted')->eq(0) + ->fetchPairs(); + + $this->loadModel('kanban'); + foreach($executionIdList as $executionID) + { + $this->kanban->updateLane($executionID, 'story', $storyID); + } + } + unset($oldStory->parent); unset($story->parent); return common::createChanges($oldStory, $story); diff --git a/module/task/control.php b/module/task/control.php index 0667d12e53..f869833fb1 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -1153,7 +1153,6 @@ class task extends control if($execution->type == 'kanban' and $this->app->tab == 'execution') { $regionID = isset($output['regionID']) ? $output['regionID'] : 0; - $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, 'all', 'id_desc', $regionID); $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID); $kanbanData = json_encode($kanbanData); From f5bc1f99a2d655d3cc08c6153d96c14887f36bdc Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 24 Mar 2022 16:53:54 +0800 Subject: [PATCH 3/3] * Modify the code. --- module/story/model.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index b56c3cd22d..ccda5eefb0 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -933,13 +933,11 @@ class storyModel extends model ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t1.story')->eq($storyID) ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.type')->in('sprint,stage,kanban') ->fetchPairs(); $this->loadModel('kanban'); - foreach($executionIdList as $executionID) - { - $this->kanban->updateLane($executionID, 'story', $storyID); - } + foreach($executionIdList as $executionID) $this->kanban->updateLane($executionID, 'story', $storyID); } unset($oldStory->parent);