From 8593f3ce07ea21d95a9b19cb54a6f95a24e47af3 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 29 Oct 2015 15:28:08 +0800 Subject: [PATCH] * adjust code for branch. --- module/bug/control.php | 34 +++++++++++----------------- module/bug/js/batchcreate.js | 4 ++-- module/bug/model.php | 4 ++-- module/bug/view/batchcreate.html.php | 1 + module/bug/view/create.html.php | 2 +- module/bug/view/report.html.php | 2 +- module/bug/view/view.html.php | 2 +- module/build/model.php | 26 ++++++++------------- module/my/view/testcase.html.php | 4 ++-- module/project/control.php | 1 - module/project/view/bug.html.php | 2 +- module/project/view/story.html.php | 2 +- module/story/model.php | 9 ++++++-- module/story/view/create.html.php | 2 +- module/story/view/edit.html.php | 2 +- module/testcase/view/browse.html.php | 2 +- module/testcase/view/create.html.php | 2 +- module/testcase/view/view.html.php | 6 ++--- module/testtask/js/create.js | 2 +- module/testtask/js/edit.js | 2 +- module/tree/view/edit.html.php | 2 +- 21 files changed, 51 insertions(+), 62 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 8794e43650..f545b45ff7 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -123,7 +123,7 @@ class bug extends control $this->config->bug->search['params']['module']['values'] = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); $this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID); $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID); - $this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID); + $this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values']; if($this->session->currentProductType == 'normal') { unset($this->config->bug->search['fields']['branch']); @@ -256,7 +256,7 @@ class bug extends control $actionID = $this->action->create('bug', $bugID, 'Opened'); $this->sendmail($bugID, $actionID); - $location = $this->createLink('bug', 'browse', "productID={$this->post->product}&type=byModule¶m={$this->post->module}"); + $location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&type=byModule¶m={$this->post->module}"); $response['locate'] = isset($_SESSION['bugList']) ? $this->session->bugList : $location; $this->send($response); } @@ -324,7 +324,7 @@ class bug extends control } else { - $builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'noempty,noterminate,nodone'); + $builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'noempty,release,noterminate,nodone'); $stories = $this->story->getProductStoryPairs($productID, $branch); } @@ -553,29 +553,21 @@ class bug extends control if($projectID) { $openedBuilds = $this->loadModel('build')->getProjectBuildPairs($projectID, $productID, $bug->branch, 'noempty,noterminate,nodone'); - $allBuilds = $this->loadModel('build')->getProjectBuildPairs($projectID, $productID, 0, 'noempty'); + $allBuilds = $this->loadModel('build')->getProjectBuildPairs($projectID, $productID, $bug->branch, 'noempty'); } else { $openedBuilds = $this->loadModel('build')->getProductBuildPairs($productID, $bug->branch, 'noempty,noterminate,nodone'); - $allBuilds = $this->loadModel('build')->getProductBuildPairs($productID, 0, 'noempty'); + $allBuilds = $this->loadModel('build')->getProductBuildPairs($productID, $bug->branch, 'noempty'); } - /* Set the openedBuilds list. */ - $oldOpenedBuilds = array(); - $bugOpenedBuilds = explode(',', $bug->openedBuild); - foreach($bugOpenedBuilds as $buildID) + /* Set the openedBuilds list*/ + $bugOpenedBuilds = array(); + foreach($allBuilds as $buildID => $build) { - if(isset($allBuilds[$buildID])) $oldOpenedBuilds[$buildID] = $allBuilds[$buildID]; - } - $openedBuilds = $openedBuilds + $oldOpenedBuilds; - - /* Set the resolvedBuilds list. */ - $oldResolvedBuild = array(); - if($bug->resolvedBuild) - { - if(isset($allBuilds[$bug->resolvedBuild])) $oldResolvedBuild[$bug->resolvedBuild] = $allBuilds[$bug->resolvedBuild]; + if(strpos($bug->openedBuild, "$buildID") !== false) $bugOpenedBuilds[$buildID] = $build; } + $openedBuilds = $openedBuilds + $bugOpenedBuilds; $this->view->bug = $bug; $this->view->productID = $productID; @@ -589,7 +581,7 @@ class bug extends control $this->view->tasks = $this->task->getProjectTaskPairs($bug->project); $this->view->users = $this->user->getPairs('nodeleted', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy"); $this->view->openedBuilds = $openedBuilds; - $this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild ; + $this->view->resolvedBuilds = array('' => '') + $openedBuilds; $this->view->actions = $this->action->getList('bug', $bugID); $this->view->templates = $this->bug->getUserBugTemplates($this->app->user->account); @@ -839,7 +831,7 @@ class bug extends control $this->view->bug = $bug; $this->view->users = $users; $this->view->assignedTo = $assignedTo; - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, 0, 'noterminate, nodone'); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); $this->view->actions = $this->action->getList('bug', $bugID); $this->display(); } @@ -895,7 +887,7 @@ class bug extends control $this->view->bug = $bug; $this->view->users = $this->user->getPairs('nodeleted', $bug->resolvedBy); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $bug->branch, 'noempty'); $this->view->actions = $this->action->getList('bug', $bugID); $this->display(); diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index 46e9b6025e..8011849c3b 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -16,11 +16,11 @@ function loadProjectBuilds(productID, projectID, index) { if(projectID) { - link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + "&varName=openedBuilds&build=''&index=" + index); + link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + "&varName=openedBuilds&build=&branch" + branch + "&index=" + index); } else { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=''&index=" + index); + link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index); } $.get(link, function(builds) diff --git a/module/bug/model.php b/module/bug/model.php index b1a9f171ce..7a04ed148b 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -210,7 +210,7 @@ class bugModel extends model * @access public * @return array */ - public function getModuleBugs($productID, $branch, $moduleIds = 0, $projects, $orderBy = 'id_desc', $pager = null) + public function getModuleBugs($productID, $branch = 0, $moduleIds = 0, $projects, $orderBy = 'id_desc', $pager = null) { return $this->dao->select('*')->from(TABLE_BUG) ->where('product')->eq((int)$productID) @@ -642,7 +642,7 @@ class bugModel extends model $productID = $bug->product; $users = $this->loadModel('user')->getPairs('nodeleted'); $product = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch(); - $stmt = $this->dao->query($this->loadModel('tree')->buildMenuQuery($productID, 'bug', '')); + $stmt = $this->dao->query($this->loadModel('tree')->buildMenuQuery($productID, 'bug')); $modules = array(); while($module = $stmt->fetch()) $modules[$module->id] = $module; diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 073ae712da..ad9804b7ad 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -131,5 +131,6 @@ + diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index b769af99f5..839a68ac9c 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -44,7 +44,7 @@ js::set('refresh', $lang->refresh); if(count($moduleOptionMenu) == 1) { echo ""; - echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug"), $lang->tree->manage, '_blank'); + echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank'); echo '  '; echo html::a("javascript:loadProductModules($productID)", $lang->refresh); echo ''; diff --git a/module/bug/view/report.html.php b/module/bug/view/report.html.php index 93ea316560..13ac384efe 100644 --- a/module/bug/view/report.html.php +++ b/module/bug/view/report.html.php @@ -18,7 +18,7 @@ icons['report']);?> bug->report->common;?>
- createLink('bug', 'browse', "productID=$productID&browseType=$browseType&moduleID=$moduleID"), $lang->goback, '', "class='btn'");?> + createLink('bug', 'browse', "productID=$productID&branch=0&browseType=$browseType&moduleID=$moduleID"), $lang->goback, '', "class='btn'");?>
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 36b8c8b104..b4a523cb46 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -131,7 +131,7 @@ foreach($modulePath as $key => $module) { $moduleTitle .= $module->name; - if(!common::printLink('bug', 'browse', "productID=$bug->product&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(!common::printLink('bug', 'browse', "productID=$bug->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; if(isset($modulePath[$key + 1])) { $moduleTitle .= '/'; diff --git a/module/build/model.php b/module/build/model.php index a229515afc..e50bd063a9 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -66,29 +66,22 @@ class buildModel extends model */ public function getProjectBuildPairs($projectID, $productID, $branch = 0, $params = '') { - $builds = array(); $sysBuilds = array(); if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); - $projectBuilds = $this->dao->select('t1.id, t1.name, t3.status as releaseStatus')->from(TABLE_BUILD)->alias('t1') + $builds = $this->dao->select('t1.id, t1.name')->from(TABLE_BUILD)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build') ->where('t1.project')->eq((int)$projectID) ->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi() ->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi() ->beginIF(strpos($params, 'nodone') !== false)->andWhere('t2.status')->ne('done')->fi() ->andWhere('t1.deleted')->eq(0) - ->orderBy('t1.date desc, t1.id desc')->fetchAll('id'); - foreach($projectBuilds as $buildID => $build) - { - if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue; - $builds[$buildID] = $build->name; - } + ->orderBy('t1.date desc, t1.id desc')->fetchPairs(); if(!$builds) return $sysBuilds; - $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) ->where('build')->in(array_keys($builds)) + ->beginIF(strpos($params, 'noterminate') !== false)->andWhere('status')->ne('terminate')->fi() ->beginIF($branch)->andWhere('branch')->in($branch)->fi() ->andWhere('deleted')->eq(0) ->fetchPairs(); @@ -110,23 +103,22 @@ class buildModel extends model if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); - $productBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.status as releaseStatus')->from(TABLE_BUILD)->alias('t1') + $productBuilds = $this->dao->select('t1.id, t1.name, t1.project')->from(TABLE_BUILD)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build') ->where('t1.product')->in($products) ->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi() + ->beginIF(strpos($params, 'nodone') !== false)->andWhere('t2.status')->ne('done')->fi() ->andWhere('t1.deleted')->eq(0) ->orderBy('t1.date desc, t1.id desc')->fetchAll('id'); $releases = $this->dao->select('build,name,deleted')->from(TABLE_RELEASE) - ->where('product')->in($products) - ->beginIF($branch)->andWhere('branch')->in($branch)->fi() - ->fetchAll('build'); + ->where('product')->in($products) + ->beginIF(strpos($params, 'noterminate') !== false)->andWhere('status')->ne('terminate')->fi() + ->beginIF($branch)->andWhere('branch')->in($branch)->fi() + ->fetchAll('build'); $builds = array(); foreach($productBuilds as $key => $build) { - if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue; - if((strpos($params, 'nodone') !== false) and ($build->projectStatus === 'done')) continue; if($build->project) { $builds[$key] = $build->name; diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index a162044cb0..1e030ec65d 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -66,7 +66,7 @@ common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', 'play', '', 'iframe'); common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', 'flag-checkered', '', 'iframe'); common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list', 'pencil'); - common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); + common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'list', 'copy'); if(common::hasPriv('testcase', 'delete')) { @@ -74,7 +74,7 @@ echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '', '', "class='btn-icon' title='{$lang->testcase->delete}'"); } - common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug'); + common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug'); ?> diff --git a/module/project/control.php b/module/project/control.php index aafd3454a4..89c0ac2a00 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1548,7 +1548,6 @@ class project extends control } else { - $branches = array(0 => 0); foreach($products as $product) $branches[$product->branch] = $product->branch; $allStories = $this->story->getProductStories(array_keys($products), $branches, $moduleID = '0', $status = 'active'); } diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index c8e8e2e679..65d3270225 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -59,7 +59,7 @@ common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true); common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true); common::printIcon('bug', 'edit', $params, $bug, 'list'); - common::printIcon('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $bug, 'list', 'copy'); + common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=bugID=$bug->id", $bug, 'list', 'copy'); ?> diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 3aa370c06c..ef624503d0 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -101,7 +101,7 @@ common::printIcon('task', 'batchCreate', "projectID={$project->id}&story={$story->id}", '', 'list', 'stack'); $lang->testcase->batchCreate = $lang->testcase->create; - if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&moduleID=$story->module&storyID=$story->id", '', 'list', 'sitemap'); + if($productID) common::printIcon('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', 'list', 'sitemap'); if(common::hasPriv('project', 'unlinkStory')) { diff --git a/module/story/model.php b/module/story/model.php index 880539e14f..d1b8d3dc79 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -971,11 +971,16 @@ class storyModel extends model */ public function getProductStories($productID = 0, $branch = 0, $moduleIds = 0, $status = 'all', $orderBy = 'id_desc', $pager = null) { + if(is_array($branch)) + { + unset($branch[0]); + $branch = join(',', $branch); + } return $this->dao->select('t1.*, t2.title as planTitle') ->from(TABLE_STORY)->alias('t1') ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') ->where('t1.product')->in($productID) - ->beginIF(!empty($branch))->andWhere("t1.branch")->in($branch)->fi() + ->beginIF($branch)->andWhere("t1.branch")->in("0,$branch")->fi() ->beginIF(!empty($moduleIds))->andWhere('t1.module')->in($moduleIds)->fi() ->beginIF($status and $status != 'all')->andWhere('t1.status')->in($status)->fi() ->andWhere('t1.deleted')->eq(0) @@ -1282,7 +1287,7 @@ class storyModel extends model ->where('t1.project')->eq((int)$projectID) ->andWhere('t2.deleted')->eq(0) ->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi() - ->beginIF($branch)->andWhere('t2.branch')->eq((int)$branch)->fi() + ->beginIF($branch)->andWhere('t2.branch')->in("0,$branch")->fi() ->beginIF($moduleIds)->andWhere('t2.module')->in($moduleIds)->fi() ->fetchAll(); if(!$stories) return array(); diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index d41cab0fb7..008ab8a3d7 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -38,7 +38,7 @@ if(count($moduleOptionMenu) == 1) { echo ""; - echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story"), $lang->tree->manage, '_blank'); + echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank'); echo '  '; echo html::a("javascript:loadProductModules($productID)", $lang->refresh); echo ''; diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 41e8ed9126..9f7f074a5a 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -71,7 +71,7 @@ if(count($moduleOptionMenu) == 1) { echo ""; - echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story"), $lang->tree->manage, '_blank'); + echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story&branch=$story->branch"), $lang->tree->manage, '_blank'); echo html::a("javascript:loadProductModules($story->product)", $lang->refresh); echo ''; } diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 1c9aa483a7..4f4bd29ac3 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -90,7 +90,7 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete); echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '', '', "title='{$lang->testcase->delete}' class='btn-icon'"); } - common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug', '', 'iframe'); + common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug', '', 'iframe'); ?> diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 8c74066b1d..4951cba5de 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -39,7 +39,7 @@ if(count($moduleOptionMenu) == 1) { echo ""; - echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case"), $lang->tree->manage, '_blank'); + echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank'); echo '  '; echo html::a("javascript:loadProductModules($productID)", $lang->refresh); echo ''; diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 9bde7e6d90..4b241b51a7 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -46,13 +46,13 @@ common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$case->id&version=$case->currentVersion", '', 'button', '', '', 'runCase'); common::printIcon('testtask', 'results', "runID=$runID&caseID=$case->id&version=$case->version", '', 'button', '', '', 'results'); - if($case->lastRunResult == 'fail') common::printIcon('testcase', 'createBug', "product=$case->product&extra=caseID=$case->id,version=$case->version,runID=$runID", '', 'button', 'bug', '', 'iframe'); + if($case->lastRunResult == 'fail') common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", '', 'button', 'bug', '', 'iframe'); echo '
'; echo "
"; common::printIcon('testcase', 'edit',"caseID=$case->id"); common::printCommentIcon('testcase'); - common::printIcon('testcase', 'create', "productID=$case->product&moduleID=$case->module&from=testcase¶m=$case->id", '', 'button', 'copy'); + common::printIcon('testcase', 'create', "productID=$case->product&branch=$branch&moduleID=$case->module&from=testcase¶m=$case->id", '', 'button', 'copy'); common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'button', '', 'hiddenwin'); echo '
'; @@ -140,7 +140,7 @@ { foreach($modulePath as $key => $module) { - if(!common::printLink('testcase', 'browse', "productID=$case->product&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; if(isset($modulePath[$key + 1])) echo $lang->arrow; } } diff --git a/module/testtask/js/create.js b/module/testtask/js/create.js index 638f2bf9e0..e422618ffd 100755 --- a/module/testtask/js/create.js +++ b/module/testtask/js/create.js @@ -21,7 +21,7 @@ function loadProjectBuilds(projectID) { selectedBuild = $('#openedBuild').val(); if(!selectedBuild) selectedBuild = 0; - link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&builds=' + selectedBuild); + link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&build=' + selectedBuild); $('#buildBox').load(link, function(){$('#build').chosen(defaultChosenOptions);}); } diff --git a/module/testtask/js/edit.js b/module/testtask/js/edit.js index 7c00ca75dc..6ab890c270 100755 --- a/module/testtask/js/edit.js +++ b/module/testtask/js/edit.js @@ -21,6 +21,6 @@ function loadProjectBuilds(projectID) { selectedBuild = $('#build').val(); if(!selectedBuild) selectedBuild = 0; - link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&builds=' + selectedBuild); + link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&build=' + selectedBuild); $('#buildBox').load(link, function(){$('#build').chosen(defaultChosenOptions);}); } diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index a9e6c0ef4e..58f9d7c464 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -60,7 +60,7 @@ var currentRoot = root;?>; var currentParent = parent;?>; function getProductModules(productID) { - $.get(createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + productID + '&viewType=story&rootModuleID=0&returnType=json'), function(data) + $.get(createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + productID + '&viewType=story&branch=0&rootModuleID=0&returnType=json'), function(data) { var newOption = ''; for(i in data) newOption += '';