From 0fed7fb36ca0babd7bda351460e9b2212eb58dce Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Thu, 17 Aug 2023 11:48:56 +0800 Subject: [PATCH] * Finish story #48612. --- module/testreport/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/testreport/model.php b/module/testreport/model.php index b9978caa89..1fb5d9d3f7 100644 --- a/module/testreport/model.php +++ b/module/testreport/model.php @@ -544,10 +544,12 @@ class testreportModel extends model { foreach($builds as $build) $bugIdList .= $build->bugs . ','; } + $bugIdList = trim($bugIdList, ','); + return $this->dao->select('*')->from(TABLE_BUG)->where('deleted')->eq(0) ->andWhere('product')->in($product) ->andWhere('openedDate')->lt("$begin 23:59:59") - ->andWhere("(id " . helper::dbIN(trim($bugIdList, ',')) . " OR (resolvedBuild = 'trunk' and resolvedDate >= '$begin' and resolvedDate <= '$end 23:59:59'))") + ->andWhere("id")->in($bugIdList) ->fetchAll('id'); }