From dd88fe7c9869fee0beb2bec90c418fdf653588b7 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Fri, 16 Aug 2024 05:29:06 +0000 Subject: [PATCH] * [bug#54103,done,0.5h] fix tree story bug. --- extension/lite/execution/ext/model/lite.php | 53 ------------------- extension/lite/execution/ext/ui/tree.html.php | 1 + 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/extension/lite/execution/ext/model/lite.php b/extension/lite/execution/ext/model/lite.php index 289c233983..da8b4082e2 100644 --- a/extension/lite/execution/ext/model/lite.php +++ b/extension/lite/execution/ext/model/lite.php @@ -113,59 +113,6 @@ public function setSubNav(array $kanbanList, object $currentKanban): void $this->lang->modulePageNav = $modulePageNav; } -/** - * 获取树状图结构。 - * Get tree structure. - * - * @param int $executionID - * @access public - * @return array - */ -public function getTree(int $executionID): array -{ - $fullTrees = $this->loadModel('tree')->getTaskStructure($executionID, 0); - - array_unshift($fullTrees, array('id' => 0, 'name' => '/', 'type' => 'task', 'actions' => false, 'root' => $executionID)); - - foreach($fullTrees as $i => $tree) - { - $tree = (object)$tree; - - if($tree->type == 'product') array_unshift($tree->children, array('id' => 0, 'name' => '/', 'type' => 'story', 'actions' => false, 'root' => $tree->root)); - $fullTree = $this->fillTasksInTree($tree, $executionID); - - if(empty($fullTree->children)) - { - unset($fullTrees[$i]); - } - else - { - $fullTrees[$i] = $fullTree; - } - } - - if(isset($fullTrees[0]) and empty($fullTrees[0]->children)) array_shift($fullTrees); - - $newTrees = array(); - - foreach($fullTrees as $i => $tree) - { - if($tree->type == 'product') - { - foreach($tree->children as $value) - { - $newTrees[] = $value; - } - } - else - { - $newTrees[] = $tree; - } - } - - return array_values($newTrees); -} - /** * 设置右上角页面切换按钮。 * Set right top page switch button. diff --git a/extension/lite/execution/ext/ui/tree.html.php b/extension/lite/execution/ext/ui/tree.html.php index b0e25b62af..dc4a30027a 100644 --- a/extension/lite/execution/ext/ui/tree.html.php +++ b/extension/lite/execution/ext/ui/tree.html.php @@ -21,6 +21,7 @@ featureBar ( set::rootClass('ml-2'), set::name('showStory'), + set::checked($this->cookie->showStory), set::text($lang->execution->treeLevel['story']), on::change('changeDisplay') )