* Finish task #54320.

This commit is contained in:
liumengyi
2022-05-18 17:00:48 +08:00
parent 0be8c4e480
commit 6aabf4eae0
3 changed files with 27 additions and 0 deletions
+25
View File
@@ -396,6 +396,7 @@ class bugModel extends model
elseif($browseType == 'needconfirm') $bugs = $this->getByNeedconfirm($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID);
elseif($browseType == 'bysearch') $bugs = $this->getBySearch($productIDList, $branch, $queryID, $sort, '', $pager, $projectID);
elseif($browseType == 'overduebugs') $bugs = $this->getOverdueBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID);
elseif($browseType == 'assignedbyme') $bugs = $this->getByAssignedbyme($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID);
return $this->checkDelayedBugs($bugs);
}
@@ -2646,6 +2647,30 @@ class bugModel extends model
->fetchAll();
}
/**
* Get by assigned by me.
*
* @param int $sonarqubeID
* @access public
* @return array
*/
public function getByAssignedbyme($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID)
{
$actionID = $this->dao->select('objectID')->from(TABLE_ACTION)->where('objectType')->eq('bug')->andWhere('action')->eq('assigned')->andWhere('actor')->eq($this->app->user->account)->fetchPairs('objectID', 'objectID');
return $this->dao->select('*')->from(TABLE_BUG)
->where('product')->in($productIDList)
->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi()
->beginIF($modules)->andWhere('module')->in($modules)->fi()
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->andWhere('execution')->in(array_keys($executions))
->andWhere('deleted')->eq(0)
->andWhere('status')->ne('closed')
->andWhere('id')->in($actionID)
->orderBy($sort)
->page($pager)
->fetchAll();
}
/**
* Get by Sonarqube id.
*