diff --git a/module/execution/control.php b/module/execution/control.php index 77e1b56781..db32dd16b4 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -496,10 +496,10 @@ class execution extends control $this->app->session->set('taskList', $this->app->getURI(true), 'execution'); $this->app->session->set('storyList', $this->app->getURI(true), 'product'); - $this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->importTask; - $this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name); - $this->view->position[] = $this->lang->execution->importTask; - $this->view->tasks2Imported = $tasks2Imported; + $this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->importTask; + $this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name); + $this->view->position[] = $this->lang->execution->importTask; + $this->view->tasks2Imported = $tasks2Imported; $this->view->executions = $executions; $this->view->executionID = $execution->id; $this->view->fromExecution = $fromExecution; diff --git a/module/execution/model.php b/module/execution/model.php index f84ac647bf..5dc71b3f15 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1674,7 +1674,7 @@ class executionModel extends model ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id') ->where('t1.product')->in(array_keys($products)) ->andWhere('t2.project')->eq($execution->project) - ->fetchGroup('execution'); + ->fetchGroup('project'); $branches = str_replace(',', "','", $branches); $tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')->from(TABLE_TASK)->alias('t1') diff --git a/module/execution/view/importtask.html.php b/module/execution/view/importtask.html.php index 729bd72040..4d9087e11a 100644 --- a/module/execution/view/importtask.html.php +++ b/module/execution/view/importtask.html.php @@ -15,9 +15,9 @@
createLink('execution', 'importTask', "execution=$executionID"), "{$lang->execution->importTask}", '', "class='btn btn-link btn-active-text'");?>
- $lang->execution->allProjects) + $executions;?> - execution->selectProject;?> - + $lang->execution->allExecutions) + $executions;?> + execution->selectExecution;?> +
diff --git a/module/project/control.php b/module/project/control.php index ec0ced4940..d66c9d8033 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -711,7 +711,7 @@ class project extends control /* Header and position. */ $title = $project->name . $this->lang->colon . $this->lang->bug->common; $position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); - $position[] = $this->bug->common; + $position[] = $this->lang->bug->common; /* Load pager and get bugs, user. */ $this->app->loadClass('pager', $static = true); @@ -721,12 +721,10 @@ class project extends control $users = $this->user->getPairs('noletter'); /* team member pairs. */ - $memberPairs = array(); + $memberPairs = array(); $memberPairs[] = ""; - foreach($this->view->teamMembers as $key => $member) - { - $memberPairs[$key] = $member->realname; - } + $teamMembers = $this->project->getTeamMembers($projectID); + foreach($teamMembers as $key => $member) $memberPairs[$key] = $member->realname; /* Build the search form. */ $actionURL = $this->createLink('project', 'bug', "projectID=$projectID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID"); @@ -743,6 +741,7 @@ class project extends control $this->view->orderBy = $orderBy; $this->view->users = $users; $this->view->productID = $productID; + $this->view->project = $this->project->getById($projectID); $this->view->branchID = empty($this->view->build->branch) ? $branchID : $this->view->build->branch; $this->view->memberPairs = $memberPairs; $this->view->type = $type; @@ -788,7 +787,7 @@ class project extends control $this->view->pager = $pager; $this->view->type = $type; $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->execution = $this->execution->getByID($executionID); + $this->view->project = $this->project->getById($projectID); $this->display(); } @@ -834,7 +833,7 @@ class project extends control $this->view->tasks = $productTasks; $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); $this->view->products = $this->loadModel('product')->getPairs('', 0); - $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. + $this->view->canBeChanged = common::canModify('project', $project); // Determines whether an object is editable. $this->display(); } diff --git a/module/project/lang/de.php b/module/project/lang/de.php index 0091c12131..d4065590a6 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -29,6 +29,10 @@ $lang->project->manageGroupMember = 'Manage Group'; $lang->project->moduleSetting = 'List Settings'; $lang->project->moduleOpen = 'Program Name'; $lang->project->dynamic = 'Dynamic'; +$lang->project->qa = 'QA'; +$lang->project->bug = 'Bug'; +$lang->project->testcase = 'Case'; +$lang->project->testtask = 'Test Task'; $lang->project->build = 'Build'; $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index fa34dfdbd0..59f79f009f 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -29,6 +29,10 @@ $lang->project->manageGroupMember = 'Manage Group'; $lang->project->moduleSetting = 'List Settings'; $lang->project->moduleOpen = 'Program Name'; $lang->project->dynamic = 'Dynamic'; +$lang->project->qa = 'QA'; +$lang->project->bug = 'Bug'; +$lang->project->testcase = 'Case'; +$lang->project->testtask = 'Test Task'; $lang->project->build = 'Build'; $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index df052721ae..a6b61210bd 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -29,6 +29,10 @@ $lang->project->manageGroupMember = 'Manage Group'; $lang->project->moduleSetting = 'List Settings'; $lang->project->moduleOpen = 'Program Name'; $lang->project->dynamic = 'Dynamic'; +$lang->project->qa = 'QA'; +$lang->project->bug = 'Bug'; +$lang->project->testcase = 'Case'; +$lang->project->testtask = 'Test Task'; $lang->project->build = 'Build'; $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; diff --git a/module/project/lang/vi.php b/module/project/lang/vi.php index befb4bd1b5..e44ab2877e 100644 --- a/module/project/lang/vi.php +++ b/module/project/lang/vi.php @@ -29,6 +29,10 @@ $lang->project->manageGroupMember = 'Manage Group'; $lang->project->moduleSetting = 'List Settings'; $lang->project->moduleOpen = 'Program Name'; $lang->project->dynamic = 'Dynamic'; +$lang->project->qa = 'QA'; +$lang->project->bug = 'Bug'; +$lang->project->testcase = 'Case'; +$lang->project->testtask = 'Test Task'; $lang->project->build = 'Build'; $lang->project->updateOrder = 'Order'; $lang->project->sort = 'Order'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 3f08fa2def..d8084ad79f 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -29,6 +29,10 @@ $lang->project->manageGroupMember = '维护分组用户'; $lang->project->moduleSetting = '列表设置'; $lang->project->moduleOpen = '显示项目集名'; $lang->project->dynamic = '动态'; +$lang->project->qa = '测试仪表盘'; +$lang->project->bug = 'Bug'; +$lang->project->testcase = '用例'; +$lang->project->testtask = '测试单'; $lang->project->build = '版本'; $lang->project->updateOrder = '排序'; $lang->project->sort = '项目排序'; diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index e1970283e3..7ab72ea2e0 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -1,11 +1,11 @@ - * @package execution + * @package project * @version $Id: bug.html.php 4894 2013-06-25 01:28:39Z wyd621@gmail.com $ * @link http://www.zentao.net */ @@ -15,32 +15,32 @@
Build:{$build->name}" : ''; - echo html::a($this->inlink('bug', "executionID={$execution->id}&orderBy=status,id_desc&build=$buildID&type=all"), "{$lang->bug->allBugs}" . ($type == 'all' ? " {$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'"); - echo html::a($this->inlink('bug', "executionID={$execution->id}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "{$lang->bug->unResolved}" . ($type == 'unresolved' ? " {$pager->recTotal}$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'"); + echo html::a($this->inlink('bug', "projectID={$project->id}&orderBy=status,id_desc&build=$buildID&type=all"), "{$lang->bug->allBugs}" . ($type == 'all' ? " {$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'"); + echo html::a($this->inlink('bug', "projectID={$project->id}&orderBy=status,id_desc&build=$buildID&type=unresolved"), "{$lang->bug->unResolved}" . ($type == 'unresolved' ? " {$pager->recTotal}$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'"); ?> bug->search;?>
- id", " " . $lang->bug->export, '', "class='btn btn-link export'");?> - id", " " . $lang->bug->create, '', "class='btn btn-primary'");?> + id", " " . $lang->bug->export, '', "class='btn btn-link export'");?> + id", " " . $lang->bug->create, '', "class='btn btn-primary'");?>
-
+

bug->noBug;?> - - createLink('bug', 'create', "productID=$productID&branch=$branchID&extra=executionID=$execution->id"), " " . $lang->bug->create, '', "class='btn btn-info'");?> + + createLink('bug', 'create', "productID=$productID&branch=$branchID&extra=projectID=$project->id"), " " . $lang->bug->create, '', "class='btn btn-info'");?>

-
+ - id}&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> + id}&orderBy=%s&build=$buildID&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
@@ -124,7 +124,7 @@ 10; - $actionLink = $this->createLink('bug', 'batchAssignTo', "executionID={$execution->id}&type=execution"); + $actionLink = $this->createLink('bug', 'batchAssignTo', "projectID={$project->id}&type=project"); echo html::select('assignedTo', $memberPairs, '', 'class="hidden"'); if($withSearch) diff --git a/module/project/view/testcase.html.php b/module/project/view/testcase.html.php index c10a65da74..90af3ae044 100644 --- a/module/project/view/testcase.html.php +++ b/module/project/view/testcase.html.php @@ -1,10 +1,10 @@
@@ -12,15 +12,15 @@

testcase->noCase;?> - - id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='execution'");?> + + id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='project'");?>

- + - recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> diff --git a/module/project/view/testtask.html.php b/module/project/view/testtask.html.php index 5d4629f5c6..c783c49111 100644 --- a/module/project/view/testtask.html.php +++ b/module/project/view/testtask.html.php @@ -28,9 +28,9 @@
- - - project", " " . $lang->testtask->create, '', "class='btn btn-primary'");?> + + + project", " " . $lang->testtask->create, '', "class='btn btn-primary'");?>
@@ -39,8 +39,8 @@

testtask->noTesttask;?> - - createLink('testtask', 'create', "product=0&execution=$executionID"), " " . $lang->testtask->create, '', "class='btn btn-info'");?> + + createLink('testtask', 'create', "product=0&project=$projectID"), " " . $lang->testtask->create, '', "class='btn btn-info'");?>

@@ -48,7 +48,7 @@
idAB);?>
- recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> '> @@ -132,7 +132,7 @@
createLink('testreport', 'browse', "objectID=$executionID&objctType=execution"); + $actionLink = $this->createLink('testreport', 'browse', "objectID=$projectID&objctType=project"); $misc = common::hasPriv('testreport', 'browse') ? "onclick=\"setFormAction('$actionLink', '', '#testtaskForm')\"" : "disabled='disabled'"; echo html::commonButton($lang->testreport->common, $misc); ?> diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index 71ed0393c0..ee2b2b9cca 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -68,15 +68,17 @@ class projectrelease extends control public function browse($projectID = 0, $executionID = 0, $type = 'all') { $this->session->set('releaseList', $this->app->getURI(true)); - $execution = $this->loadModel('execution')->getById($this->session->project); + $project = $this->project->getById($projectID); + $execution = $this->loadModel('execution')->getById($executionID); if($projectID) $this->project->setMenu($projectID); if($executionID) $this->loadModel('execution')->setMenu($executionID, $this->app->rawModule, $this->app->rawMethod); - $this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse; + $this->view->title = $project->name . $this->lang->colon . $this->lang->release->browse; $this->view->position[] = $this->lang->release->browse; $this->view->execution = $execution; - $this->view->products = $this->loadModel('product')->getProducts($this->session->project); + $this->view->project = $project; + $this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ); $this->view->releases = $this->projectrelease->getList($projectID, $type); $this->view->projectID = $projectID; $this->view->executionID = $executionID; diff --git a/module/testtask/control.php b/module/testtask/control.php index cbe72533d9..fbe3f2c8d7 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -205,7 +205,7 @@ class testtask extends control /* Set menu. */ $productID = $this->product->saveState($productID, $this->products); - $this->testtask->setMenu($this->products, $productID); + $this->loadModel('qa')->setMenu($this->products, $productID); $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->create; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); @@ -254,7 +254,7 @@ class testtask extends control $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); } - $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID); $this->executeHooks($taskID); @@ -391,7 +391,7 @@ class testtask extends control if(!$task) die(js::error($this->lang->testtask->checkLinked) . js::locate('back')); $productID = $task->product; - $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID); setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot, '', false, true); /* Determines whether an object is editable. */ @@ -507,7 +507,7 @@ class testtask extends control } } - $this->testtask->setMenu($this->products, $productID, $branchID, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $branchID, $taskID); $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->common . $this->lang->colon . $this->lang->testtask->reportChart; $this->view->position[] = html::a($this->createLink('testtask', 'cases', "taskID=$taskID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->reportChart; @@ -543,7 +543,7 @@ class testtask extends control $task = $this->testtask->getById($taskID); if(!$task) die(js::error($this->lang->notFound) . js::locate('back')); $productID = $task->product; - $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID); /* Determines whether an object is editable. */ $canBeChanged = common::canBeChanged('testtask', $task); @@ -624,7 +624,7 @@ class testtask extends control } /* Set menu. */ - $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID); $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->edit; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); @@ -677,7 +677,7 @@ class testtask extends control $productID = $this->product->saveState($testtask->product, $this->products); /* Set menu. */ - $this->testtask->setMenu($this->products, $productID, $testtask->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $testtask->branch, $taskID); $this->view->testtask = $testtask; $this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start; @@ -719,7 +719,7 @@ class testtask extends control $productID = $this->product->saveState($testtask->product, $this->products); /* Set menu. */ - $this->testtask->setMenu($this->products, $productID, $testtask->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $testtask->branch, $taskID); $this->view->testtask = $testtask; $this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start; @@ -761,7 +761,7 @@ class testtask extends control $productID = $this->product->saveState($testtask->product, $this->products); /* Set menu. */ - $this->testtask->setMenu($this->products, $productID, $testtask->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $testtask->branch, $taskID); $this->view->testtask = $this->testtask->getById($taskID); $this->view->title = $testtask->name . $this->lang->colon . $this->lang->close; @@ -804,7 +804,7 @@ class testtask extends control $productID = $this->product->saveState($testtask->product, $this->products); /* Set menu. */ - $this->testtask->setMenu($this->products, $productID, $testtask->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $testtask->branch, $taskID); $this->view->testtask = $testtask; $this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start; @@ -878,7 +878,7 @@ class testtask extends control $productID = $this->product->saveState($task->product, $this->products); /* Save session. */ - $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $task->branch, $taskID); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -1086,7 +1086,7 @@ class testtask extends control /* The case of tasks of qa. */ if($productID) { - $this->testtask->setMenu($this->products, $productID, $taskID); + $this->loadModel('qa')->setMenu($this->products, $productID, $taskID); $this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($productID, 'case'); $cases = $this->dao->select('*')->from(TABLE_CASE)->where('id')->in($caseIDList)->fetchAll('id'); @@ -1207,7 +1207,7 @@ class testtask extends control die(js::locate($this->createLink('testtask', 'unitCases', "taskID=$taskID"), 'parent')); } - $this->testtask->setMenu($this->products, $productID); + $this->loadModel('qa')->setMenu($this->products, $productID); $this->app->loadLang('job');
testtask->product);?>