This commit is contained in:
hufangzhou
2021-12-24 10:47:30 +08:00
parent be2d532c77
commit 1aeccfed43
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -2146,9 +2146,9 @@ class taskModel extends model
if(!$this->loadModel('common')->checkField(TABLE_TASK, $type)) return array();
$tasks = $this->dao->select('t1.*, t2.id as executionID, t2.name as executionName, t3.id as storyID, t3.title as storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion')
->from(TABLE_TASK)->alias('t1')
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
->leftjoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.project = t4.id')
->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.execution = t2.id and (t2.type = 'stage' or t2.type = 'sprint')")
->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
->leftJoin(TABLE_PROJECT)->alias('t4')->on("t1.project = t4.id and t4.type = 'project'")
->where('t1.deleted')->eq(0)
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi()
@@ -2220,8 +2220,8 @@ class taskModel extends model
{
$tasks = $this->dao->select('t1.*')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project=t3.id')
->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.execution = t2.id and (t2.type = 'sprint' or t2.type = 'stage')")
->leftJoin(TABLE_PROJECT)->alias('t3')->on("t1.project = t3.id and t3.type = 'project'")
->where('t1.assignedTo')->eq($this->app->user->account)
->andWhere('(t2.status')->eq('suspended')
->orWhere('t3.status')->eq('suspended')