diff --git a/module/execution/control.php b/module/execution/control.php index 12a8187cb8..08da11ef96 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1914,7 +1914,7 @@ class execution extends control /* Get execution's product. */ $productID = 0; - $productPairs = $this->loadModel('product')->getProductPairsByExecution($executionID); + $productPairs = $this->loadModel('product')->getProductPairsByProject($executionID); if($productPairs) $productID = key($productPairs); $this->view->title = $this->lang->execution->storyKanban; diff --git a/module/execution/model.php b/module/execution/model.php index 8c8fae3e6b..6a2783adb0 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -313,6 +313,7 @@ class executionModel extends model $execution = $this->getByID($executionID); $this->session->set('project', $execution->project); } + /** * Create a execution. * @@ -345,7 +346,7 @@ class executionModel extends model ->setDefault('lastEditedBy', $this->app->user->account) ->setDefault('lastEditedDate', helper::now()) ->setDefault('team', substr($this->post->name,0, 30)) - ->setIF($this->config->systemMode == 'new', 'execution', $this->session->PRJ) + ->setIF($this->config->systemMode == 'new', 'project', $this->session->PRJ) ->setIF($this->config->systemMode == 'new', 'parent', $this->session->PRJ) ->setIF($this->post->acl == 'open', 'whitelist', '') ->join('whitelist', ',') @@ -1136,7 +1137,7 @@ class executionModel extends model ->andWhere('t2.deleted')->eq(0) ->fetchPairs(); - $products = $this->loadModel('product')->getProductPairsByExecution($projectID); + $products = $this->loadModel('product')->getProductPairsByProject($projectID); foreach($executions as $id => $execution) { @@ -2309,7 +2310,7 @@ class executionModel extends model if($executionType == 'execution') { $childSprints = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($execution->id)->andWhere('type')->in('stage,sprint')->andWhere('deleted')->eq('0')->fetchPairs(); - $linkedProducts = $this->loadModel('product')->getProductPairsByExecution($execution->id); + $linkedProducts = $this->loadModel('product')->getProductPairsByProject($execution->id); $this->loadModel('user')->updateUserView(array($executionID), 'execution', $changedAccounts); if(!empty($childSprints)) $this->user->updateUserView($childSprints, 'sprint', $changedAccounts); @@ -2355,7 +2356,7 @@ class executionModel extends model $changedAccounts = array_unique($changedAccounts); $this->loadModel('user')->updateUserView($executionID, $executionType, $changedAccounts); - $linkedProducts = $this->loadModel('product')->getProductPairsByExecution($executionID); + $linkedProducts = $this->loadModel('product')->getProductPairsByProject($executionID); if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', $changedAccounts); } @@ -2386,7 +2387,7 @@ class executionModel extends model { $this->dao->delete()->from(TABLE_TEAM)->where('root')->eq($sprint->execution)->andWhere('type')->eq('execution')->andWhere('account')->eq($account)->exec(); $this->loadModel('user')->updateUserView($sprint->execution, 'execution', array($account)); - $linkedProducts = $this->loadModel('product')->getProductPairsByExecution($sprint->execution); + $linkedProducts = $this->loadModel('product')->getProductPairsByProject($sprint->execution); if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', array($account)); } }