diff --git a/module/bug/config.php b/module/bug/config.php index 8f8c1baa82..f84abe7e2f 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -61,7 +61,7 @@ $config->bug->search['fields']['status'] = $lang->bug->status; $config->bug->search['fields']['confirmed'] = $lang->bug->confirmed; $config->bug->search['fields']['product'] = $lang->bug->product; -$config->bug->search['fields']['branch'] = $lang->bug->branch; +$config->bug->search['fields']['branch'] = ''; $config->bug->search['fields']['plan'] = $lang->bug->productplan; $config->bug->search['fields']['module'] = $lang->bug->module; $config->bug->search['fields']['project'] = $lang->bug->project; diff --git a/module/bug/control.php b/module/bug/control.php index f9ec0fc239..31235a9572 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -131,6 +131,7 @@ class bug extends control } else { + $this->config->bug->search['fields']['branch'] = $this->lang->product->branch; $this->config->bug->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty'); } $this->loadModel('search')->setSearchParams($this->config->bug->search); diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 584bdf4013..142387c24e 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -14,7 +14,6 @@ $lang->bug->common = 'Bug'; $lang->bug->id = 'Bug编号'; $lang->bug->product = '所属' . $lang->productCommon; $lang->bug->productplan = '所属计划'; -$lang->bug->branch = '所属分支'; $lang->bug->module = '所属模块'; $lang->bug->path = '模块路径'; $lang->bug->project = '所属' . $lang->projectCommon; diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index b4a523cb46..28f1883148 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -112,7 +112,7 @@ session->currentProductType != 'normal'):?> - bug->branch;?> + product->branch;?> product&branch=$bug->branch", $branchName)) echo $branchName;?> diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index 34221b8a84..eae5c871d1 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -31,7 +31,6 @@ $lang->build->basicInfo = '基本信息'; $lang->build->id = 'ID'; $lang->build->product = $lang->productCommon; -$lang->build->branch = '所属分支'; $lang->build->project = $lang->projectCommon; $lang->build->name = '名称编号'; $lang->build->date = '打包日期'; diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index dd78563438..5772f515ca 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -224,7 +224,7 @@ productType != 'normal'):?> - build->branch;?> + product->branch;?> diff --git a/module/product/config.php b/module/product/config.php index 50a2ac808b..a806d1d8dd 100644 --- a/module/product/config.php +++ b/module/product/config.php @@ -13,7 +13,7 @@ $config->product->search['fields']['status'] = $lang->story->status; $config->product->search['fields']['pri'] = $lang->story->pri; $config->product->search['fields']['product'] = $lang->story->product; -$config->product->search['fields']['branch'] = $lang->story->branch; +$config->product->search['fields']['branch'] = ''; $config->product->search['fields']['module'] = $lang->story->module; $config->product->search['fields']['plan'] = $lang->story->plan; $config->product->search['fields']['estimate'] = $lang->story->estimate; diff --git a/module/product/control.php b/module/product/control.php index eee917f75f..12519cf349 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -178,6 +178,7 @@ class product extends control } else { + $this->config->product->search['fields']['branch'] = $this->lang->product->branch; $this->config->product->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty'); } $this->loadModel('search')->setSearchParams($this->config->product->search); diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 82a375b6c3..d639888445 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -66,6 +66,7 @@ $lang->product->QD = '测试负责人'; $lang->product->RD = '发布负责人'; $lang->product->acl = '访问控制'; $lang->product->whitelist = '分组白名单'; +$lang->product->branch = '所属%s'; $lang->product->moduleStory = '按模块'; $lang->product->searchStory = '搜索'; @@ -89,6 +90,9 @@ $lang->product->typeList['normal'] = '正常'; $lang->product->typeList['branch'] = '多分支'; $lang->product->typeList['platform'] = '多平台'; +$lang->product->branchName['branch'] = '分支'; +$lang->product->branchName['platform'] = '平台'; + $lang->product->statusList[''] = ''; $lang->product->statusList['normal'] = '正常'; $lang->product->statusList['closed'] = '结束'; diff --git a/module/product/model.php b/module/product/model.php index ede626aed9..d93d66a98e 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -69,6 +69,7 @@ class productModel extends model if($currentProduct->type == 'normal') unset($this->lang->product->menu->branch); if($currentProduct->type != 'normal') { + $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); $branches = $this->loadModel('branch')->getPairs($productID); $branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0]; $output .= '
  • '; diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index ac2e427e1a..65a34b28d3 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -39,7 +39,6 @@ $lang->productplan->confirmUnlinkBug = "您确认移除该Bug吗?"; $lang->productplan->id = '编号'; $lang->productplan->product = $lang->productCommon; -$lang->productplan->branch = '所属分支'; $lang->productplan->title = '名称'; $lang->productplan->desc = '描述'; $lang->productplan->begin = '开始日期'; diff --git a/module/productplan/view/create.html.php b/module/productplan/view/create.html.php index 2c2d4fe24e..49ef602b7f 100644 --- a/module/productplan/view/create.html.php +++ b/module/productplan/view/create.html.php @@ -29,7 +29,7 @@ type != 'normal'):?> - productplan->branch;?> + product->branch;?> diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php index 2ce86b73b8..e7b4866302 100644 --- a/module/productplan/view/edit.html.php +++ b/module/productplan/view/edit.html.php @@ -30,7 +30,7 @@ type != 'normal'):?> - productplan->branch;?> + product->branch;?> branch, 'class="form-control"');?> diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index cc57370ed4..e0abf68170 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -233,6 +233,12 @@ productplan->title;?> title;?> + type != 'normal'):?> + + product->branch;?> + branch];?> + + productplan->begin;?> begin;?> diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php index a0a5ceab24..8f077b0a04 100644 --- a/module/release/lang/zh-cn.php +++ b/module/release/lang/zh-cn.php @@ -31,7 +31,6 @@ $lang->release->basicInfo = '基本信息'; $lang->release->id = 'ID'; $lang->release->product = $lang->productCommon; -$lang->release->branch = '所属分支'; $lang->release->build = '版本'; $lang->release->name = '发布名称'; $lang->release->date = '发布日期'; diff --git a/module/release/view/create.html.php b/module/release/view/create.html.php index 38e25264ee..a1db04e238 100644 --- a/module/release/view/create.html.php +++ b/module/release/view/create.html.php @@ -28,7 +28,7 @@ js::set('page' , 'create'); type != 'normal'):?> - + diff --git a/module/release/view/edit.html.php b/module/release/view/edit.html.php index 90d6529b30..95c9175688 100644 --- a/module/release/view/edit.html.php +++ b/module/release/view/edit.html.php @@ -30,7 +30,7 @@ js::set('oldReleasedBuild' , $release->build);
    release->branch;?>product->branch;?>
    type != 'normal'):?> - + diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index bda44fb57f..ff5dba915d 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -268,7 +268,7 @@ productType != 'normal'):?> - + diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index f666910bc6..70ff48f550 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -39,7 +39,6 @@ $lang->story->batchAssignTo = "批量指派"; $lang->story->common = '需求'; $lang->story->id = '编号'; $lang->story->product = "所属{$lang->productCommon}"; -$lang->story->branch = "所属分支"; $lang->story->module = '所属模块'; $lang->story->source = '来源'; $lang->story->fromBug = '来源Bug'; diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 18718e48bb..43d2b3b4fd 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -113,7 +113,7 @@ type != 'normal'):?> - + diff --git a/module/testcase/config.php b/module/testcase/config.php index 329bdddabd..1be6d0c5d4 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -35,7 +35,7 @@ $config->testcase->search['fields']['type'] = $lang->testcase->type; $config->testcase->search['fields']['openedBy'] = $lang->testcase->openedBy; $config->testcase->search['fields']['status'] = $lang->testcase->status; $config->testcase->search['fields']['product'] = $lang->testcase->product; -$config->testcase->search['fields']['branch'] = $lang->testcase->branch; +$config->testcase->search['fields']['branch'] = ''; $config->testcase->search['fields']['stage'] = $lang->testcase->stage; $config->testcase->search['fields']['module'] = $lang->testcase->module; $config->testcase->search['fields']['pri'] = $lang->testcase->pri; diff --git a/module/testcase/control.php b/module/testcase/control.php index 0da1936243..86e7b36567 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -149,6 +149,7 @@ class testcase extends control } else { + $this->config->testcase->search['fields']['branch'] = $this->lang->product->branch; $this->config->testcase->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty'); } $this->config->testcase->search['actionURL'] = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID"); diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index c8b7442e7a..181c955753 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -11,7 +11,6 @@ */ $lang->testcase->id = '用例编号'; $lang->testcase->product = "所属{$lang->productCommon}"; -$lang->testcase->branch = "所属分支"; $lang->testcase->module = '所属模块'; $lang->testcase->story = '相关需求'; $lang->testcase->storyVersion = '需求版本'; diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 4b241b51a7..5310738a2c 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -124,7 +124,7 @@ type != 'normal'):?> - + diff --git a/module/testtask/control.php b/module/testtask/control.php index b3172feedd..21905cdcd8 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -309,6 +309,7 @@ class testtask extends control } else { + $this->config->testcase->search['fields']['branch'] = $this->lang->product->branch; $this->config->testcase->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty'); } $this->loadModel('search')->setSearchParams($this->config->testcase->search); @@ -572,15 +573,8 @@ class testtask extends control $this->config->testcase->search['params']['product']['values']= array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct); $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); $this->config->testcase->search['actionURL'] = inlink('linkcase', "taskID=$taskID"); - if($this->session->currentProductType == 'normal') - { - unset($this->config->testcase->search['fields']['branch']); - unset($this->config->testcase->search['params']['branch']); - } - else - { - $this->config->testcase->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty'); - } + unset($this->config->testcase->search['fields']['branch']); + unset($this->config->testcase->search['params']['branch']); $this->loadModel('search')->setSearchParams($this->config->testcase->search); /* Save session. */
    release->branch;?>product->branch;?>
    release->branch;?>product->branch;?>
    story->branch;?>product->branch;?> product&branch=$story->branch", $branches[$story->branch]);?>
    testcase->branch;?>product->branch;?> product&branch=$case->branch", $branchName)) echo $branchName;?>