From 89a5416c45565818074d605e47e46f0281fe4cb2 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 25 Mar 2021 10:21:39 +0800 Subject: [PATCH] * Fix a bug. --- module/testcase/model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index 873c3036b8..068e03a3fa 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -508,7 +508,10 @@ class testcaseModel extends model ->beginIF($this->app->openApp == 'project')->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case')->fi() ->where($caseQuery) ->beginIF($this->app->openApp == 'project')->andWhere('t2.project')->eq($this->session->project)->fi() - ->beginIF(!empty($productID) and $queryProductID != 'all')->andWhere('product')->eq($productID)->fi() + ->beginIF(!empty($productID) and $queryProductID != 'all') + ->beginIF($this->app->openApp == 'project')->andWhere('t2.product')->eq($productID)->fi() + ->beginIF($this->app->openApp != 'project')->andWhere('product')->eq($productID)->fi() + ->fi() ->beginIF($auto != 'unit')->andWhere('auto')->ne('unit')->fi() ->beginIF($auto == 'unit')->andWhere('auto')->eq('unit')->fi() ->andWhere('deleted')->eq(0)