From fc2637c488da6684134fcc0725e26ea38b8e83c1 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 23 Jun 2025 01:19:59 +0000 Subject: [PATCH] * [bug#63563] Get tasks with multiple executions. --- module/task/tao.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/task/tao.php b/module/task/tao.php index 87404cd011..0ae7dac4e2 100644 --- a/module/task/tao.php +++ b/module/task/tao.php @@ -486,7 +486,7 @@ class taskTao extends taskModel $actionIDList = array(); if($type == 'assignedbyme') $actionIDList = $this->dao->select('objectID')->from(TABLE_ACTION)->where('objectType')->eq('task')->andWhere('action')->eq('assigned')->andWhere('actor')->eq($this->app->user->account)->fetchPairs('objectID', 'objectID'); - if($executionID) $execution = $this->fetchByID($executionID, 'project'); + if(is_numeric($executionID) && $executionID) $execution = $this->fetchByID($executionID, 'project'); $tasks = $this->dao->select($fields) ->from(TABLE_TASK)->alias('t1') @@ -494,8 +494,8 @@ class taskTao extends taskModel ->leftJoin(TABLE_TASKTEAM)->alias('t3')->on('t3.task = t1.id') ->beginIF($productID)->leftJoin(TABLE_MODULE)->alias('t4')->on('t1.module = t4.id')->fi() ->beginIF($this->config->edition == 'max' or $this->config->edition == 'ipd')->leftJoin(TABLE_DESIGN)->alias('t5')->on('t1.design= t5.id')->fi() - ->where('t1.execution')->eq((int)$executionID) - ->beginIF(!empty($execution->isTpl))->andWhere('t1.isTpl')->eq('1')->fi() + ->where('t1.execution')->in($executionID) + ->beginIF(is_numeric($executionID) && !empty($execution->isTpl))->andWhere('t1.isTpl')->eq('1')->fi() ->beginIF($type == 'myinvolved') ->andWhere("((t3.`account` = '{$this->app->user->account}') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')") ->fi()