From ada30f3cf876f132994eb842b7e62feb50036e22 Mon Sep 17 00:00:00 2001 From: zhaixiaojian Date: Tue, 13 Aug 2024 09:05:44 +0800 Subject: [PATCH] * [task#125051,done,4h,3h] format code. --- module/bug/model.php | 4 ++-- module/task/model.php | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 2de243ebcd..20865e49bf 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2136,8 +2136,8 @@ class bugModel extends model { return $this->dao->select('t1.revision,t3.id AS id,t3.title AS title') ->from(TABLE_REPOHISTORY)->alias('t1') - ->leftJoin(TABLE_RELATION)->alias('t2')->on('t2.relation="completedin" and t2.BType="commit" and t2.BID=h.id') - ->leftJoin(TABLE_BUG)->alias('t3')->on('t2.AType="bug" and t2.AID=b.id') + ->leftJoin(TABLE_RELATION)->alias('t2')->on('t2.relation="completedin" and t2.BType="commit" and t2.BID=t1.id') + ->leftJoin(TABLE_BUG)->alias('t3')->on('t2.AType="bug" and t2.AID=t3.id') ->where('t1.revision')->in($revisions) ->andWhere('t1.repo')->eq($repoID) ->andWhere('t3.id')->ne('') diff --git a/module/task/model.php b/module/task/model.php index b2ba35718f..bf37d64d7b 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -3327,13 +3327,13 @@ class taskModel extends model */ public function getLinkedCommits(int $repoID, array $revisions): array { - return $this->dao->select('h.revision,t.id AS id,t.name AS name') - ->from(TABLE_REPOHISTORY)->alias('h') - ->leftJoin(TABLE_RELATION)->alias('r')->on('r.relation="completedin" and r.BType="commit" and r.BID=h.id') - ->leftJoin(TABLE_TASK)->alias('t')->on('r.AType="task" and r.AID=t.id') - ->where('h.revision')->in($revisions) - ->andWhere('h.repo')->eq($repoID) - ->andWhere('t.id')->ne('') + return $this->dao->select('t1.revision,t3.id AS id,t3.name AS name') + ->from(TABLE_REPOHISTORY)->alias('t1') + ->leftJoin(TABLE_RELATION)->alias('t2')->on('t2.relation="completedin" and t2.BType="commit" and t2.BID=t1.id') + ->leftJoin(TABLE_TASK)->alias('t3')->on('t2.AType="task" and t2.AID=t3.id') + ->where('t1.revision')->in($revisions) + ->andWhere('t1.repo')->eq($repoID) + ->andWhere('t3.id')->ne('') ->fetchGroup('revision', 'id'); } }