diff --git a/module/execution/control.php b/module/execution/control.php index c298a9f8e6..6e6f344931 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -981,7 +981,6 @@ class execution extends control $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'all') : ''; $this->view->allProducts = array_filter($this->executionZen->getAllProductsForCreate($project)); $this->view->allProjects = $this->project->getPairsByModel('all', 'noclosed,multiple'); - $this->view->multiBranchProducts = $this->loadModel('product')->getMultiBranchPairs(); $this->view->products = $products; $this->view->teams = $this->execution->getCanCopyObjects($projectID); $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed'); @@ -1127,7 +1126,6 @@ class execution extends control $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed'); $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->branches = $branches; - $this->view->multiBranchProducts = $this->product->getMultiBranchPairs(); $this->view->allProducts = $linkedObjects->allProducts; $this->view->linkedProducts = $linkedObjects->linkedProducts; $this->view->linkedBranches = $linkedObjects->linkedBranches; diff --git a/module/execution/js/common.ui.js b/module/execution/js/common.ui.js index a414ef59ca..4640e32bae 100644 --- a/module/execution/js/common.ui.js +++ b/module/execution/js/common.ui.js @@ -147,7 +147,7 @@ function loadBranches(e) { let productID = $(this).val(); if(productID > 0 && chosenProducts.indexOf(productID) == -1) chosenProducts.push(productID); - if($product.val() != 0 && $product.val() == $(this).val() && $product.attr('id') != $(this).attr('id') && !multiBranchProducts[$product.val()]) + if($product.val() != 0 && $product.val() == $(this).val() && $product.attr('id') != $(this).attr('id')) { zui.Modal.alert(errorSameProducts); $product.zui('picker').$.setValue(0); diff --git a/module/execution/js/create.ui.js b/module/execution/js/create.ui.js index dad61062b5..6e8f39f3db 100644 --- a/module/execution/js/create.ui.js +++ b/module/execution/js/create.ui.js @@ -16,38 +16,6 @@ $(function() if(copyExecutionID != 0 || projectID != 0) loadMembers(); setWhite(); - - $(document).on('click', 'button[type=submit]', function() - { - let products = new Array(); - let existedBranch = false; - - /* Determine whether the products of the same branch are linked. */ - $(".productsBox select[name^='products']").each(function() - { - let productID = $(this).val(); - if(typeof(products[productID]) == 'undefined') products[productID] = new Array(); - if(multiBranchProducts[productID]) - { - let branchID = $(this).closest('.form-row').find("select[name^=branch]").val(); - if(products[productID][branchID]) - { - existedBranch = true; - } - else - { - products[productID][branchID] = branchID; - } - if(existedBranch) return false; - } - }); - - if(existedBranch) - { - zui.Modal.alert(errorSameBranches); - return false; - } - }); }); /** diff --git a/module/execution/js/edit.ui.js b/module/execution/js/edit.ui.js index 1c5dbdaabc..94e281e96f 100644 --- a/module/execution/js/edit.ui.js +++ b/module/execution/js/edit.ui.js @@ -2,38 +2,6 @@ $(function() { if($('#typeHover').length) new zui.Tooltip('#typeHover', {title: typeTip, trigger: 'hover', placement: 'right', type: 'white', 'className': 'text-gray border border-light'}); - $(document).on('click', 'button[type=submit]', function() - { - let products = new Array(); - let existedBranch = false; - - /* Determine whether the products of the same branch are linked. */ - $(".productsBox select[name^='products']").each(function() - { - let productID = $(this).val(); - if(typeof(products[productID]) == 'undefined') products[productID] = new Array(); - if(multiBranchProducts[productID]) - { - let branchID = $(this).closest('.form-row').find("select[name^=branch]").val(); - if(products[productID][branchID]) - { - existedBranch = true; - } - else - { - products[productID][branchID] = branchID; - } - if(existedBranch) return false; - } - }); - - if(existedBranch) - { - zui.Modal.alert(errorSameBranches); - return false; - } - }); - if(isWaterfall) hidePlanBox(executionAttr); }); diff --git a/module/execution/ui/create.html.php b/module/execution/ui/create.html.php index d908cf9e1c..5e5a1d433e 100644 --- a/module/execution/ui/create.html.php +++ b/module/execution/ui/create.html.php @@ -15,10 +15,8 @@ jsVar('+projectID', $projectID); jsVar('copyProjectID', $copyProjectID); jsVar('weekend', $config->execution->weekend); jsVar('errorSameProducts', $lang->execution->errorSameProducts); -jsVar('errorSameBranches', $lang->execution->errorSameBranches); jsVar('isStage', $isStage); jsVar('copyExecutionID', $copyExecutionID); -jsVar('multiBranchProducts', $multiBranchProducts); jsVar('executionID', isset($executionID) ? $executionID : 0); $methodBox = null; diff --git a/module/execution/ui/edit.html.php b/module/execution/ui/edit.html.php index d90e5955a2..713381f98a 100644 --- a/module/execution/ui/edit.html.php +++ b/module/execution/ui/edit.html.php @@ -12,10 +12,8 @@ namespace zin; jsVar('weekend', $config->execution->weekend); jsVar('errorSameProducts', $lang->execution->errorSameProducts); -jsVar('errorSameBranches', $lang->execution->errorSameBranches); jsVar('unmodifiableProducts',$unmodifiableProducts); jsVar('unmodifiableBranches', $unmodifiableBranches); -jsVar('multiBranchProducts', $multiBranchProducts); jsVar('linkedStoryIDList', $linkedStoryIDList); jsVar('confirmSync', $lang->execution->confirmSync); jsVar('unLinkProductTip', $lang->project->unLinkProductTip);