From d26e8dd29c72bce28bb78a2cd1754fa2b34a480f Mon Sep 17 00:00:00 2001 From: sunguangming Date: Wed, 28 Aug 2024 08:00:06 +0000 Subject: [PATCH] * [bug#54615,done,0.5h] fix bug. --- module/execution/model.php | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 5cc1e78217..36a79c1718 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3299,26 +3299,8 @@ class executionModel extends model /* Update the user's execution permission. */ $this->updateUserView($executionID, 'sprint', array($account)); - /* Remove team members from the sprint or stage, and determine whether to remove team members from the project. */ - if(strpos(',stage,sprint,kanban,', ",$execution->type,") !== false) - { - $teamMember = $this->dao->select('t1.id, t2.account')->from(TABLE_EXECUTION)->alias('t1') - ->leftJoin(TABLE_TEAM)->alias('t2')->on('t1.id = t2.root') - ->where('t1.project')->eq($execution->project) - ->andWhere('t1.type')->eq($execution->type) - ->andWhere('t2.account')->eq($account) - ->fetch(); - - /* Remove the user from the project team members and update the user's product permission. */ - if(empty($teamMember)) - { - $this->dao->delete()->from(TABLE_TEAM)->where('root')->eq($execution->project)->andWhere('type')->eq('project')->andWhere('account')->eq($account)->exec(); - $this->loadModel('user')->updateUserView(array($execution->project), 'project', array($account)); - - $linkedProducts = $this->loadModel('product')->getProductPairsByProject($execution->project); - if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', array($account)); - } - } + $linkedProducts = $this->loadModel('product')->getProductPairsByProject($execution->id); + if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', array($account)); } /**