diff --git a/module/testcase/js/batchedit.ui.js b/module/testcase/js/batchedit.ui.js index f8d91b86a1..fc437e0d53 100644 --- a/module/testcase/js/batchedit.ui.js +++ b/module/testcase/js/batchedit.ui.js @@ -1,5 +1,14 @@ window.handleRenderRow = function($row, index, row) { + /* Set the branches for the row. */ + if(branchProduct) + { + $row.find('.form-batch-control[data-name="branch"] .picker-box').on('inited', function(e, info) + { + let $branch = info[0]; + $branch.$.setValue(row.branch); + }); + } /* Set the modules for the row. */ $row.find('.form-batch-control[data-name="module"] .picker-box').on('inited', function(e, info) { diff --git a/module/testcase/ui/batchedit.html.php b/module/testcase/ui/batchedit.html.php index e99d0393a1..570ae0a7a4 100644 --- a/module/testcase/ui/batchedit.html.php +++ b/module/testcase/ui/batchedit.html.php @@ -10,11 +10,13 @@ declare(strict_types=1); */ namespace zin; -jsVar('modulePairs', $modulePairs); -jsVar('scenePairs', $scenePairs); -jsVar('productID', $productID); -jsVar('products', $products); -jsVar('cases', $cases); +jsVar('branchProduct', $branchProduct); +jsVar('branchOption', $branchTagOption[$productID]); +jsVar('modulePairs', $modulePairs); +jsVar('scenePairs', $scenePairs); +jsVar('productID', $productID); +jsVar('products', $products); +jsVar('cases', $cases); if(isset($suhosinInfo)) {