From e46c521642013ab55adf2cb8ad9152a58e276cc2 Mon Sep 17 00:00:00 2001 From: holan20180123 Date: Wed, 18 Aug 2021 17:34:55 +0800 Subject: [PATCH] * Finish task #41577. --- module/project/model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 31c2fed1c8..d78184b796 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1269,15 +1269,16 @@ class projectModel extends model { $this->dao->delete()->from(TABLE_TEAM)->where('root')->eq((int)$projectID)->andWhere('type')->eq('project')->andWhere('account')->eq($account)->exec(); + $this->loadModel('user'); + $this->user->updateUserView($projectID, 'project', array($account)); + if($removeExecution == 'yes') { $executions = $this->loadModel('execution')->getByProject($projectID, 'undone', 0, true); $this->dao->delete()->from(TABLE_TEAM)->where('root')->in(array_keys($executions))->andWhere('type')->eq('execution')->andWhere('account')->eq($account)->exec(); + $this->user->updateUserView(array_keys($executions), 'sprint', array($account)); } - $this->loadModel('user'); - $this->user->updateUserView($projectID, 'project', array($account)); - $linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID); if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', array($account)); }