From 5d05d5ccbfd0db8b20479b678d31ac1e69a6bc05 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 16 Aug 2024 14:34:20 +0800 Subject: [PATCH] * [bug#54048,done,1h] Not show shadow build in the build list. --- 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 92e4e8dc87..9addd64c7c 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -67,11 +67,13 @@ class buildModel extends model */ public function getProjectBuilds(int $projectID = 0, string $type = 'all', string $param = '', string $orderBy = 't1.date_desc,t1.id_desc', object $pager = null): array { - $builds = $this->dao->select('t1.*, t2.name as productName') + $shadows = $this->dao->select('shadow')->from(TABLE_RELEASE)->where("FIND_IN_SET({$projectID}, project)")->fetchPairs('shadow', 'shadow'); + $builds = $this->dao->select('t1.*, t2.name as productName') ->from(TABLE_BUILD)->alias('t1') ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') ->where('t1.deleted')->eq(0) ->andWhere('t1.project')->ne(0) + ->andWhere('t1.id')->notIN($shadows) ->beginIF($projectID)->andWhere('t1.project')->eq((int)$projectID)->fi() ->beginIF($type == 'product' && $param)->andWhere('t1.product')->eq((int)$param)->fi() ->beginIF($type == 'bysearch')->andWhere($param)->fi()