diff --git a/db/update20.0.sql b/db/update20.0.sql index 9a45e6c8d7..b15f35efaa 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -19,5 +19,3 @@ ALTER TABLE `zt_project` ADD `stageBy` enum('project', 'product') NOT NULL DEFAU UPDATE `zt_project` SET `stageBy` = 'project' WHERE `division` = '0'; UPDATE `zt_project` SET `stageBy` = 'product' WHERE `division` = '1'; ALTER TABLE `zt_project` DROP `division`; - -UPDATE `zt_grouppriv` SET `method` = 'sort' WHERE `module` = 'product' AND `method` = 'updateOrder'; diff --git a/module/product/control.php b/module/product/control.php index 3a12a47446..866800cce5 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -551,7 +551,7 @@ class product extends control * @access public * @return void */ - public function sort() + public function updateOrder() { /* Can only be order by program sorting. */ $orderBy = $this->post->orderBy; @@ -561,7 +561,7 @@ class product extends control $sortedIdList = explode(',', trim($this->post->products, ',')); /* Sort by sorted id list. */ - $this->product->sort($sortedIdList); + $this->product->updateOrder($sortedIdList); } /** @@ -847,8 +847,8 @@ class product extends control if(empty($executionID)) return print(html::select('product', array(), '', "class='form-control chosen' required")); $this->app->loadLang('build'); - $status = empty($this->config->CRProduct) ? 'noclosed' : ''; - $products = $this->product->getProductPairsByProject($executionID, $status); + $status = empty($this->config->CRProduct) ? 'noclosed' : 'all'; + $products = $this->product->getProducts($executionID, $status, '', $withBranch = false); if(empty($products)) return printf($this->lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), 'project'); return print(html::select('product', $products, '', "onchange='loadBranches(this.value);' class='form-control chosen' required data-toggle='modal' data-type='iframe'")); diff --git a/module/product/js/all.js b/module/product/js/all.js index 92d2265e31..f437fc574a 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -154,7 +154,7 @@ $(function() { products += $(this.item).data('id') + ',' ; }); - $.post(createLink('product', 'sort'), {'products' : products, 'orderBy' : orderBy}); + $.post(createLink('product', 'updateOrder'), {'products' : products, 'orderBy' : orderBy}); $('#productListForm').table('initNestedList'); } diff --git a/module/program/view/product.html.php b/module/program/view/product.html.php index 954a800908..504b0a8429 100644 --- a/module/program/view/product.html.php +++ b/module/program/view/product.html.php @@ -37,7 +37,7 @@