From a14fc4e7f9bc7addb492ab1424aa805c564221cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Thu, 30 Sep 2021 15:49:24 +0800 Subject: [PATCH] * finish task #42848. --- module/execution/model.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 8b87219dea..514cfc9287 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1233,10 +1233,24 @@ class executionModel extends model $executions = $executionList; } + $projects = array(); + if(empty($projectID)) + { + $projects = $this->dao->select('t1.id,t1.name')->from(TABLE_PROJECT)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.id=t2.project') + ->where('t2.id')->in(array_keys($executions)) + ->fetchPairs('id', 'name'); + } + if($pairs) { $executionPairs = array(); - foreach($executions as $execution) $executionPairs[$execution->id] = $execution->name; + foreach($executions as $execution) + { + $executionPairs[$execution->id] = ''; + if(isset($projects[$execution->project])) $executionPairs[$execution->id] .= $projects[$execution->project] . ' / '; + $executionPairs[$execution->id] .= $execution->name; + } $executions = $executionPairs; }