diff --git a/module/bug/control.php b/module/bug/control.php index d647615c48..39eed6253e 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -476,8 +476,13 @@ class bug extends control $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch); if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story"))); - $productList = $this->product->getOrderedProducts('all', 40, $this->projectID); - foreach($productList as $product) $products[$product->id] = $product->name; + $products = $this->products; + if($projectID) + { + $products = array(); + $productList = $this->product->getOrderedProducts('all', 40, $projectID); + foreach($productList as $product) $products[$product->id] = $product->name; + } /* Set custom. */ foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field; diff --git a/module/execution/control.php b/module/execution/control.php index a397315629..113841b806 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2762,7 +2762,7 @@ class execution extends control unset($fields[$key]); } - $executionStats = $this->execution->getStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc'); + $executionStats = $this->project->getStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc'); $users = $this->loadModel('user')->getPairs('noletter'); foreach($executionStats as $i => $execution) { diff --git a/module/execution/model.php b/module/execution/model.php index 0d66c12e74..3448870df4 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2369,7 +2369,7 @@ class executionModel extends model $member->type = $executionType; $executionMember[$account] = $member; - $this->dao->insert(TABLE_TEAM)->data($member)->exec(); + $this->dao->replace(TABLE_TEAM)->data($member)->exec(); } /* Only changed account update userview. */ diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 5d0872c765..4940fb4365 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -44,7 +44,7 @@ createLink('execution', 'create'), " " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary'");?> -
+