* adjust code.

This commit is contained in:
wangyidong
2021-07-01 16:56:59 +08:00
parent c74a1f483d
commit c287a0cb49
7 changed files with 22 additions and 13 deletions
+7 -4
View File
@@ -2372,7 +2372,7 @@ class executionModel extends model
$changedAccounts = array_unique($changedAccounts);
/* Add the execution team members to the project. */
$this->addProjectMembers($execution->project, $executionMember);
if($execution->project) $this->addProjectMembers($execution->project, $executionMember);
if($execution->acl != 'open') $this->updateUserView($executionID, 'sprint', $changedAccounts);
}
@@ -2406,9 +2406,12 @@ class executionModel extends model
$changedAccounts = array_merge($changedAccounts, array_diff($oldAccounts, $accounts));
$changedAccounts = array_unique($changedAccounts);
$this->loadModel('user')->updateUserView($projectID, $projectType, $changedAccounts);
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', $changedAccounts);
if($changedAccounts)
{
$this->loadModel('user')->updateUserView($projectID, $projectType, $changedAccounts);
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', $changedAccounts);
}
}
/**