diff --git a/module/execution/control.php b/module/execution/control.php index 2022012ff6..5f19561985 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1992,8 +1992,14 @@ class execution extends control /* Get execution's product. */ $productID = 0; - $products = $this->loadModel('product')->getProducts($execution->project); - if($products) $productID = key($products); + $branchID = 0; + $products = $this->loadModel('product')->getProducts($executionID); + if($products) + { + $productID = key($products); + $branches = $this->loadModel('branch')->getPairs($productID, '', $executionID); + if($branches) $branchID = key($branches); + } $plans = $this->execution->getPlans($products); $allPlans = array('' => ''); @@ -2011,6 +2017,7 @@ class execution extends control $this->view->orderBy = $orderBy; $this->view->groupBy = $groupBy; $this->view->productID = $productID; + $this->view->branchID = $branchID; $this->view->allPlans = $allPlans; $this->view->kanbanData = $kanbanData; $this->view->executionActions = $executionActions; diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index 541f894d88..bb28bde6e2 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -146,12 +146,12 @@ js::set('hasTaskButton', $hasTaskButton);