From a57e30ced710347ded01dcad37b6fba8f4086428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Wed, 17 Jan 2018 12:23:58 +0800 Subject: [PATCH] * Fix bug. --- module/testcase/lang/en.php | 5 +++-- module/testcase/lang/zh-cn.php | 5 +++-- module/testtask/control.php | 8 +++++--- module/testtask/js/cases.js | 13 ------------- module/testtask/model.php | 4 ---- module/testtask/view/caseheader.html.php | 1 - module/testtask/view/groupcase.html.php | 6 +++--- 7 files changed, 14 insertions(+), 28 deletions(-) diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index 6a7b773a0d..a9e5ee5fd6 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -164,8 +164,9 @@ $lang->testcase->reviewResultList[''] = ''; $lang->testcase->reviewResultList['pass'] = 'Pass'; $lang->testcase->reviewResultList['clarify'] = 'Clarify'; -$lang->testcase->groups[''] = 'Group '; -$lang->testcase->groups['story'] = 'Story Group'; +$lang->testcase->groups[''] = 'Group '; +$lang->testcase->groups['story'] = 'Story Group'; +$lang->testcase->groups['assignedTo'] = 'Assign Group'; $lang->testcase->statusList[''] = ''; $lang->testcase->statusList['wait'] = 'ToReview'; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 7faacd6e49..5973c6d1fe 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -164,8 +164,9 @@ $lang->testcase->reviewResultList[''] = ''; $lang->testcase->reviewResultList['pass'] = '确认通过'; $lang->testcase->reviewResultList['clarify'] = '继续完善'; -$lang->testcase->groups[''] = '分组查看'; -$lang->testcase->groups['story'] = '需求分组'; +$lang->testcase->groups[''] = '分组查看'; +$lang->testcase->groups['story'] = '需求分组'; +$lang->testcase->groups['assignedTo'] = '指派分组'; $lang->testcase->statusList[''] = ''; $lang->testcase->statusList['wait'] = '待评审'; diff --git a/module/testtask/control.php b/module/testtask/control.php index 03e2e57660..fb9b4167a8 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -251,11 +251,9 @@ class testtask extends control } if($browseType == 'bymodule') setcookie('taskCaseModule', (int)$param, $this->config->cookieLife, $this->config->webRoot); if($browseType != 'bymodule') $this->session->set('taskCaseBrowseType', $browseType); - if($browseType == 'account') $this->session->set('taskCaseAccount', $param); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->taskCaseModule ? $this->cookie->taskCaseModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; - $account = ($browseType == 'account') ? $param : 'all'; /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy, 't2.id'); @@ -302,7 +300,6 @@ class testtask extends control $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; $this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden'; $this->view->pager = $pager; - $this->view->account = $account; $this->view->branches = $this->loadModel('branch')->getPairs($productID); $this->view->setShowModule = false; @@ -390,6 +387,11 @@ class testtask extends control $groupCases[$run->story][] = $run; $groupByList[$run->story] = $run->storyTitle; } + elseif($groupBy == 'assignedTo') + { + if(empty($run->assignedTo)) continue; + $groupCases[$run->assignedTo][] = $run; + } } $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->cases; diff --git a/module/testtask/js/cases.js b/module/testtask/js/cases.js index ef979ec08b..8f8a14db11 100644 --- a/module/testtask/js/cases.js +++ b/module/testtask/js/cases.js @@ -6,16 +6,3 @@ $(document).ready(function() setTimeout(function(){fixedTheadOfList('#caseList')}, 100); if($('#caseList thead th.w-title').width() < 150) $('#caseList thead th.w-title').width(150); }); - -function changeUser(account, taskID) -{ - if(account == '') - { - link = createLink('testtask', 'cases', 'taskID=' + taskID + '&browseType=all'); - } - else - { - link = createLink('testtask', 'cases', 'taskID=' + taskID + '&browseType=account¶m=' + account); - } - location.href = link; -} diff --git a/module/testtask/model.php b/module/testtask/model.php index a7b3e7d983..6a31949453 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -758,10 +758,6 @@ class testtaskModel extends model { $runs = $this->getUserRuns($task->id, $this->session->user->account, $modules, $sort, $pager); } - elseif($browseType == 'account') - { - $runs = $this->getUserRuns($task->id, $this->session->taskCaseAccount, $modules, $sort, $pager); - } /* By search. */ elseif($browseType == 'bysearch') { diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php index 972cbae239..b2c6c5a946 100644 --- a/module/testtask/view/caseheader.html.php +++ b/module/testtask/view/caseheader.html.php @@ -39,7 +39,6 @@ echo html::a($this->inlink('groupCase', "taskID=$taskID&groupBy=$key"), $value); } echo ''; - echo "
  • " . html::select('account', $users, $account, "onchange='changeUser(this.value, $taskID)' class='form-control chosen'") . '
  • '; } if($this->methodName == 'cases') echo "
  •  {$lang->testcase->bySearch}
  • "; diff --git a/module/testtask/view/groupcase.html.php b/module/testtask/view/groupcase.html.php index 3349b3ecd6..0672e1ae41 100644 --- a/module/testtask/view/groupcase.html.php +++ b/module/testtask/view/groupcase.html.php @@ -17,7 +17,7 @@ - + @@ -34,9 +34,9 @@ $groupCases):?> - + - +
    px'> testcase->title;?> priAB;?> typeAB;?>