From 30b7ecbee7f2a0ddcbe8487b1e3d65b5f9773b58 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 26 Jul 2022 16:02:47 +0800 Subject: [PATCH] * Fix bug #24009. --- module/execution/control.php | 5 +++-- module/execution/model.php | 2 ++ module/execution/view/task.html.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 028fccf797..43c685c403 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -191,7 +191,8 @@ class execution extends control $pager = new pager($recTotal, $recPerPage, $pageID); /* Get tasks. */ - $tasks = $this->execution->getTasks($productID, $executionID, $this->executions, $browseType, $queryID, $moduleID, $sort, $pager); + $allTasks = $this->task->getExecutionTasks($executionID); + $tasks = $this->execution->getTasks($productID, $executionID, $this->executions, $browseType, $queryID, $moduleID, $sort, $pager); if(empty($tasks) and $pageID > 1) { $pager = pager::init(0, $recPerPage, 1); @@ -221,7 +222,7 @@ class execution extends control /* Assign. */ $this->view->tasks = $tasks; - $this->view->allTasksNum = $this->task->getExecutionTasks($executionID); + $this->view->allTasks = $allTasks; $this->view->summary = $this->execution->summary($tasks); $this->view->tabID = 'task'; $this->view->pager = $pager; diff --git a/module/execution/model.php b/module/execution/model.php index 0d09eb4597..eb5d3dc9aa 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3410,6 +3410,8 @@ class executionModel extends model ->orderBy($orderBy) ->fetchAll('id'); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', true); + if(empty($tasks)) return array(); $taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in(array_keys($tasks))->andWhere('type')->eq('task')->fetchGroup('root'); diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php index c22f33ac04..b055076ec7 100644 --- a/module/execution/view/task.html.php +++ b/module/execution/view/task.html.php @@ -198,7 +198,7 @@ body {margin-bottom: 25px;}

task->noTask;?> - + " . $lang->task->create, '', "class='btn btn-info'");?>