From faf421ffc2a6d354ca364e50ea499fff8deaef35 Mon Sep 17 00:00:00 2001 From: liyang Date: Wed, 5 Nov 2025 16:40:31 +0800 Subject: [PATCH] * [task#152048] filter shadows project. --- module/build/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/build/model.php b/module/build/model.php index 52b1e7e99d..79f7e6541f 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -268,7 +268,9 @@ class buildModel extends model if(strpos($params, 'notrunk') === false) $sysBuilds = array('trunk' => $this->lang->trunk); $buildIdList = str_replace('trunk', '0', $buildIdList); - $shadows = $this->dao->select('shadow')->from(TABLE_RELEASE)->where('product')->in($productIdList)->fetchPairs('shadow', 'shadow'); // Get the buildID under the shadow product. + $shadows = array(); + if(!empty($productIdList)) $shadows = $this->dao->select('shadow')->from(TABLE_RELEASE)->where('product')->in($productIdList)->fetchPairs('shadow', 'shadow'); // Get the buildID under the shadow product. + if($objectType == 'project') $shadows = $this->dao->select('shadow')->from(TABLE_RELEASE)->where("FIND_IN_SET({$objectID}, project)")->fetchPairs('shadow', 'shadow'); $selectedBuilds = $this->buildTao->selectedBuildPairs($buildIdList, $productIdList, $params, $objectID, $objectType); $allBuilds = $this->buildTao->fetchBuilds($productIdList, $params, $objectID, $objectType, $shadows, $system);