This commit is contained in:
Yagami
2023-03-01 14:48:12 +08:00
parent 925456c326
commit 97c421c5b4
2 changed files with 13 additions and 2 deletions
+7 -1
View File
@@ -3675,7 +3675,13 @@ class executionModel extends model
if($changedAccounts)
{
$this->loadModel('user')->updateUserView($projectID, $projectType, $changedAccounts);
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
$linkedProducts = $this->dao->select("t2.id")->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->where('t2.deleted')->eq(0)
->andWhere('t1.project')->eq($projectID)
->andWhere('t2.vision')->eq($this->config->vision)
->fetchPairs();
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', $changedAccounts);
}
}
+6 -1
View File
@@ -2204,7 +2204,12 @@ class projectModel extends model
$changedAccounts = array_unique($changedAccounts);
$childSprints = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq($projectID)->andWhere('type')->in('stage,sprint')->andWhere('deleted')->eq('0')->fetchPairs();
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
$linkedProducts = $this->dao->select("t2.id")->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->where('t2.deleted')->eq(0)
->andWhere('t1.project')->eq($projectID)
->andWhere('t2.vision')->eq($this->config->vision)
->fetchPairs();
$this->loadModel('user')->updateUserView(array($projectID), 'project', $changedAccounts);
if(!empty($childSprints)) $this->user->updateUserView($childSprints, 'sprint', $changedAccounts);