From a992f59c9537ffad3874b3d356298890ebb0dcab Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 31 May 2023 14:16:34 +0800 Subject: [PATCH] * When the parent task is -1, the hierarchical structure is displayed incorrectly. --- module/execution/ui/task.html.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/execution/ui/task.html.php b/module/execution/ui/task.html.php index 8ab82f1f59..ec89eb1983 100644 --- a/module/execution/ui/task.html.php +++ b/module/execution/ui/task.html.php @@ -100,6 +100,15 @@ sidebar /* zin: Define the dtable in main content. */ foreach($tasks as &$task) { + /* Set parent task attribute. */ + $task->isParent = false; + if($task->parent == -1) + { + /* When the parent task is -1, the hierarchical structure is displayed incorrectly. */ + $task->parent = 0; + $task->isParent = true; + } + $actions = array(); if(!in_array($task->status, array('cancel', 'closed')) && !empty($task->storyStatus) && $task->storyStatus == 'active' && $task->latestStoryVersion > $task->storyVersion) $actions[] = 'confirmStoryChange';