diff --git a/module/execution/model.php b/module/execution/model.php index 03e57902cd..d43ac07fbb 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1578,6 +1578,8 @@ class executionModel extends model ->page($pager) ->fetchAll('id'); + if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->fetchPairs(); + $hours = $this->loadModel('project')->computerProgress($executions); $burns = $this->getBurnData($executions); @@ -1638,6 +1640,12 @@ class executionModel extends model unset($executions[$key]); } } + + /* Bind execution product */ + if(!empty($projectProductIdList) and !empty($projectProductIdList[$execution->id])) + { + $execution->product = $projectProductIdList[$execution->id]; + } } return array_values($executions); } diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 211674df6c..d5a16517ff 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -104,7 +104,8 @@
division = $project->division;?> - execution->printNestedList($execution, false, $users, $productID);?> + product)) ? $execution->product : $productID;?> + execution->printNestedList($execution, false, $users, $executionProductID);?>