From b151d1fb3271ef366c09a4d0657259788ff1df81 Mon Sep 17 00:00:00 2001 From: Yagami Date: Fri, 24 Feb 2023 14:50:37 +0800 Subject: [PATCH] * Finish task #85459. --- module/common/view/kanban.html.php | 2 +- module/execution/control.php | 2 +- module/execution/model.php | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/module/common/view/kanban.html.php b/module/common/view/kanban.html.php index 02e883aa1f..04818b6019 100644 --- a/module/common/view/kanban.html.php +++ b/module/common/view/kanban.html.php @@ -222,7 +222,7 @@ function renderExecutionItem(item, $item) if(!$title.length) { - if((item.type == 'kanban' && window.userPrivs.kanban) || (item.type != 'kanban' && window.userPrivs.execution)) + if(!item.hasOwnProperty('children') && ((item.type == 'kanban' && window.userPrivs.kanban) || (item.type != 'kanban' && window.userPrivs.execution))) { var method = item.type == 'kanban' ? 'kanban' : 'task'; diff --git a/module/execution/control.php b/module/execution/control.php index 0cc50cc321..d4e84f8008 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2812,7 +2812,7 @@ class execution extends control { $this->loadModel('project'); $projects = $this->project->getPairsByProgram('', 'noclosed'); - $executions = $this->execution->getStatData(0, 'all', 0, 0, false, '', 'id_desc'); + $executions = $this->execution->getStatData(0, 'all', 0, 0, false, 'withchild', 'id_desc'); foreach($executions as $execution) { diff --git a/module/execution/model.php b/module/execution/model.php index 44a6cf11c9..dab018c741 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2042,7 +2042,11 @@ class executionModel extends model } } - foreach($childList as $childID) unset($executions[$childID]); + if(strpos($param, 'withchild') === false) + { + foreach($childList as $childID) unset($executions[$childID]); + } + foreach($parentList as $parentID) unset($executions[$parentID]); return array_values($executions);