From f875e59a890393b245dfc203c2856ad9490b2eed Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 18 Dec 2023 04:12:55 -0500 Subject: [PATCH] * Fix bug #41963. --- module/testtask/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 31a1d67b82..6ff41e4708 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -96,7 +96,11 @@ class testtaskModel extends model ->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in("0,{$this->app->user->view->sprints}")->fi() ->beginIF($scopeAndStatus[0] == 'local')->andWhere('t1.product')->eq((int)$productID)->fi() ->beginIF($scopeAndStatus[0] == 'all')->andWhere('t1.product')->in($products)->fi() - ->beginIF(strtolower($scopeAndStatus[1]) == 'myinvolved')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.members)")->fi() + ->beginIF(strtolower($scopeAndStatus[1]) == 'myinvolved') + ->andWhere('(t1.owner')->eq($this->app->user->account) + ->orWhere("FIND_IN_SET('{$this->app->user->account}', t1.members)") + ->markRight(1) + ->fi() ->beginIF(strtolower($scopeAndStatus[1]) == 'totalstatus')->andWhere('t1.status')->in('blocked,doing,wait,done')->fi() ->beginIF(!in_array(strtolower($scopeAndStatus[1]), array('totalstatus', 'review', 'myinvolved'), true))->andWhere('t1.status')->eq($scopeAndStatus[1])->fi() ->beginIF($branch !== 'all')->andWhere("CONCAT(',', t4.branch, ',')")->like("%,$branch,%")->fi()