diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 2ea72bad1a..a5c97acf63 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -152,7 +152,8 @@ function loadBranches(product) if($inputgroup.find('select').size() >= 2) $inputgroup.removeClass('has-branch').find('select:last').remove(); if($inputgroup.find('.chosen-container').size() >= 2) $inputgroup.find('.chosen-container:last').remove(); - var projectID = config.systemMode == 'new' ? $('#project').val() : 0; + var projectID = (typeof(systemMode) != 'undefined' && systemMode == 'new') ? $('#project').val() : 0; + var index = $inputgroup.find('select:first').attr('id').replace('products' , ''); $.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=0¶m=active&projectID=" + projectID), function(data) { diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index faef2a3cba..a8d70a5385 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -41,6 +41,7 @@ systemMode);?> project->common);?> +systemMode);?>