* Fix bug #25814.
This commit is contained in:
@@ -1790,6 +1790,8 @@ class bugModel extends model
|
||||
->andWhere('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
|
||||
->beginIF(!empty($productID) and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('product')->eq($productID)->fi()
|
||||
->beginIF(!empty($productID) and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('branch')->eq($branchID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -1801,7 +1803,7 @@ class bugModel extends model
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF(empty($build))->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi()
|
||||
->andWhere('t1.branch')->eq($branchID)
|
||||
->beginIF(!empty($productID))->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
->beginIF($type == 'unresolved')->andWhere('t1.status')->eq('active')->fi()
|
||||
->beginIF($type == 'noclosed')->andWhere('t1.status')->ne('closed')->fi()
|
||||
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
|
||||
@@ -1856,6 +1858,8 @@ class bugModel extends model
|
||||
->andWhere('execution')->eq((int)$executionID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
|
||||
->beginIF(!empty($productID) and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('product')->eq($productID)->fi()
|
||||
->beginIF(!empty($productID) and $branchID != 'all' and strpos($bugQuery, 'product') === false and strpos($bugQuery, '`product` IN') === false)->andWhere('branch')->eq($branchID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
@@ -1865,7 +1869,7 @@ class bugModel extends model
|
||||
$bugs = $this->dao->select('t1.*')->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=t2.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($branchID != 'all')->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
->beginIF(!empty($productID) and $branchID != 'all')->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
->beginIF(empty($build))->andWhere('t1.execution')->eq($executionID)->fi()
|
||||
->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi()
|
||||
->beginIF($type == 'unresolved')->andWhere('t1.status')->eq('active')->fi()
|
||||
|
||||
Reference in New Issue
Block a user