diff --git a/module/testtask/model.php b/module/testtask/model.php index 4f837c3ba7..8841c5f707 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -91,7 +91,7 @@ class testtaskModel extends model ->beginIF($scopeAndStatus[0] == 'all')->andWhere('t1.product')->in($products)->fi() ->beginIF(strtolower($scopeAndStatus[1]) == 'totalstatus')->andWhere('t1.status')->in('blocked,doing,wait,done')->fi() ->beginIF(!in_array(strtolower($scopeAndStatus[1]), array('totalstatus', 'review'), true))->andWhere('t1.status')->eq($scopeAndStatus[1])->fi() - ->beginIF($branch !== 'all')->andWhere('t4.branch')->eq($branch)->fi() + ->beginIF($branch !== 'all')->andWhere("CONCAT(',', t4.branch, ',')")->like("%,$branch,%")->fi() ->beginIF($beginTime)->andWhere('t1.begin')->ge($beginTime)->fi() ->beginIF($endTime)->andWhere('t1.end')->le($endTime)->fi() ->beginIF($branch == BRANCH_MAIN)