Merge branch 'sprint/master_fixbug' into 'master'
* Fix bug #21576. See merge request easycorp/zentaopms!2913
This commit is contained in:
@@ -1568,15 +1568,19 @@ class bugModel extends model
|
||||
*/
|
||||
public function getUserBugPairs($account, $appendProduct = true, $limit = 0, $skipProductIDList = array(), $skipExecutionIDList = array())
|
||||
{
|
||||
$deletedProjectIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(1)->fetchPairs('id', 'id');
|
||||
|
||||
$bugs = array();
|
||||
$stmt = $this->dao->select('t1.id, t1.title, t2.name as product')
|
||||
->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')
|
||||
->on('t1.product=t2.id')
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->beginIF(!empty($deletedProjectIDList))->andWhere('t1.execution')->notin($deletedProjectIDList)->fi()
|
||||
->beginIF(!empty($skipProductIDList))->andWhere('t1.product')->notin($skipProductIDList)->fi()
|
||||
->beginIF(!empty($skipExecutionIDList))->andWhere('t1.execution')->notin($skipExecutionIDList)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->orderBy('id desc')
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->query();
|
||||
|
||||
@@ -2343,6 +2343,8 @@ class taskModel extends model
|
||||
*/
|
||||
public function getUserTaskPairs($account, $status = 'all', $skipExecutionIDList = array())
|
||||
{
|
||||
$deletedProjectIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(1)->fetchPairs('id', 'id');
|
||||
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as execution')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
|
||||
@@ -2351,6 +2353,7 @@ class taskModel extends model
|
||||
->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->beginIF(!empty($skipExecutionIDList))->andWhere('t1.execution')->notin($skipExecutionIDList)->fi()
|
||||
->beginIF(!empty($deletedProjectIDList))->andWhere('t1.execution')->notin($deletedProjectIDList)->fi()
|
||||
->query();
|
||||
|
||||
$tasks = array();
|
||||
|
||||
Reference in New Issue
Block a user