From fda36656009eeece9190c99a4bf5ca68c32337cb Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 16 Aug 2023 16:33:16 +0800 Subject: [PATCH] * testcaseModel: query all scenes if the branch is all, fix bug #37363. --- module/testcase/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index 8d8b693f15..5b0f09dee5 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -3284,7 +3284,7 @@ class testcaseModel extends model $scenes = $this->dao->select('*')->from(TABLE_SCENE) ->where('deleted')->eq('0') ->andWhere('product')->eq($productID) - ->beginIF($branch)->andWhere('branch')->eq($branch)->fi() + ->beginIF($branch !== 'all')->andWhere('branch')->eq($branch)->fi() ->beginIF($moduleID)->andWhere('module')->eq($moduleID)->fi() ->orderBy('grade_desc, sort_asc') ->fetchAll('id'); @@ -3300,7 +3300,7 @@ class testcaseModel extends model ->where('deleted')->eq('0') ->andWhere('scene')->ne(0) ->andWhere('product')->eq($productID) - ->beginIF($branch)->andWhere('branch')->eq($branch)->fi() + ->beginIF($branch !== 'all')->andWhere('branch')->eq($branch)->fi() ->beginIF($moduleID)->andWhere('module')->eq($moduleID)->fi() ->orderBy($orderBy) ->fetchAll('id');