diff --git a/module/block/control.php b/module/block/control.php index 0600dd4317..94e91cba42 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -985,7 +985,7 @@ class block extends control } $testedBuilds = $this->dao->select('build')->from(TABLE_TESTTASK)->where('product')->in(array_keys($products))->andWhere('project')->ne(0)->andWhere('deleted')->eq(0)->fetchPairs(); - $builds = $this->dao->select('id, product, name, bugs')->from(TABLE_BUILD)->where('id')->in($testedBuilds)->andWhere('deleted')->eq(0)->fetchGroup('product', 'id'); + $builds = $this->dao->select('id, product, name, bugs')->from(TABLE_BUILD)->where('id')->in($testedBuilds)->andWhere('deleted')->eq(0)->orderBy('id_desc')->fetchGroup('product', 'id'); $openedBugs = $this->dao->select('id, openedBuild')->from(TABLE_BUG)->where('openedBuild')->in($testedBuilds)->andWhere('deleted')->eq(0)->fetchGroup('openedBuild', 'id'); /* Get bugs. */ diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 21d5f68933..4df5b22da8 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -277,7 +277,7 @@ $lang->bug->menu = new stdclass(); $lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,batchactivate,confirmbug,assignto', 'subModule' => 'tree'); $lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s'); -$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s'); +$lang->bug->menu->testtask = array('link' => 'Test Task|testtask|browse|productID=%s'); $lang->bug->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s'); $lang->bug->menu->report = array('link' => 'Report|testreport|browse|productID=%s'); $lang->bug->menu->caselib = array('link' => 'Library|testsuite|library'); @@ -286,7 +286,7 @@ $lang->testcase = new stdclass(); $lang->testcase->menu = new stdclass(); $lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'); $lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree'); -$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s'); +$lang->testcase->menu->testtask = array('link' => 'Test Task|testtask|browse|productID=%s'); $lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s'); $lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s'); $lang->testcase->menu->caselib = array('link' => 'Library|testsuite|library'); @@ -295,7 +295,7 @@ $lang->testtask = new stdclass(); $lang->testtask->menu = new stdclass(); $lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'); $lang->testtask->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s'); -$lang->testtask->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report'); +$lang->testtask->menu->testtask = array('link' => 'Test Task|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report'); $lang->testtask->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s'); $lang->testtask->menu->report = array('link' => 'Report|testreport|browse|productID=%s'); $lang->testtask->menu->caselib = array('link' => 'Library|testsuite|library'); @@ -304,7 +304,7 @@ $lang->testsuite = new stdclass(); $lang->testsuite->menu = new stdclass(); $lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'); $lang->testsuite->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s'); -$lang->testsuite->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s'); +$lang->testsuite->menu->testtask = array('link' => 'Test Task|testtask|browse|productID=%s'); $lang->testsuite->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase'); $lang->testsuite->menu->report = array('link' => 'Report|testreport|browse|productID=%s'); $lang->testsuite->menu->caselib = array('link' => 'Library|testsuite|library'); @@ -313,7 +313,7 @@ $lang->testreport = new stdclass(); $lang->testreport->menu = new stdclass(); $lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'); $lang->testreport->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s'); -$lang->testreport->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s'); +$lang->testreport->menu->testtask = array('link' => 'Test Task|testtask|browse|productID=%s'); $lang->testreport->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s'); $lang->testreport->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit'); $lang->testreport->menu->caselib = array('link' => 'Library|testsuite|library'); @@ -322,7 +322,7 @@ $lang->caselib = new stdclass(); $lang->caselib->menu = new stdclass(); $lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|'); $lang->caselib->menu->testcase = array('link' => 'Case|testcase|browse|'); -$lang->caselib->menu->testtask = array('link' => 'Build|testtask|browse|'); +$lang->caselib->menu->testtask = array('link' => 'Test Task|testtask|browse|'); $lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|'); $lang->caselib->menu->report = array('link' => 'Report|testreport|browse|'); $lang->caselib->menu->caselib = array('link' => 'Library|testsuite|library', 'alias' => 'createlib,createcase,libview,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase'); diff --git a/module/testtask/control.php b/module/testtask/control.php index aa32e08e7f..fd07f9f130 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -22,6 +22,7 @@ class testtask extends control public function __construct($moduleName = '', $methodName = '') { parent::__construct($moduleName, $methodName); + $this->loadModel('project'); $this->loadModel('product'); $this->view->products = $this->products = $this->product->getPairs('nocode'); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testtask"))); @@ -255,7 +256,7 @@ class testtask extends control /* Get task and product info, set menu. */ $task = $this->testtask->getById($taskID); - if(!$task) die(js::error($this->lang->notFound) . js::locate('back')); + if(!$task) die(js::error($this->lang->testtask->checkLinked) . js::locate('back')); $productID = $task->product; $this->testtask->setMenu($this->products, $productID, $task->branch, $taskID); setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot); diff --git a/module/testtask/js/results.js b/module/testtask/js/results.js index 6400cb2041..f9ee0f657c 100644 --- a/module/testtask/js/results.js +++ b/module/testtask/js/results.js @@ -6,7 +6,7 @@ $(function() $this.toggleClass('show-detail'); var show = $this.hasClass('show-detail'); $this.next('.result-detail').toggleClass('hide', !show); - $this.find('.collapse-handle').toggleClass('icon-chevron-down', !show).toggleClass('icon-chevron-up', show);; + $this.find('.collapse-handle').toggleClass('icon-angle-down', !show).toggleClass('icon-angle-top', show);; }); $(".step-group input[type='checkbox']").click(function() @@ -22,6 +22,5 @@ $(function() $('#casesResults table caption .result-tip').html($('#resultTip').html()); - $('tr:first').addClass("show-detail"); - $('#tr-detail_1').removeClass("hide"); + $('tr:first').click(); }); diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php index 05ea7c622d..abcb3ab575 100644 --- a/module/testtask/lang/en.php +++ b/module/testtask/lang/en.php @@ -105,6 +105,7 @@ $lang->testtask->confirmDelete = 'Do you want to delete this test build?'; $lang->testtask->confirmUnlinkCase = 'Do you want to unlink this Case?'; $lang->testtask->noticeNoOther = 'There are no other test task for this product'; $lang->testtask->noTesttask = 'No test tasks. '; +$lang->testtask->checkLinked = "Please check if the testtask product is linked to project."; $lang->testtask->assignedToMe = 'My'; $lang->testtask->allCases = 'AllCases'; diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 3609436d76..453b5264c9 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -105,6 +105,7 @@ $lang->testtask->confirmDelete = '您确认要删除该版本吗?'; $lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?'; $lang->testtask->noticeNoOther = '该产品还没有其他测试版本'; $lang->testtask->noTesttask = '暂时没有测试版本。'; +$lang->testtask->checkLinked = '请检查测试单的产品是否与项目相关联'; $lang->testtask->assignedToMe = '指派给我'; $lang->testtask->allCases = '所有用例'; diff --git a/module/testtask/view/results.html.php b/module/testtask/view/results.html.php index e747344718..60f8545008 100644 --- a/module/testtask/view/results.html.php +++ b/module/testtask/view/results.html.php @@ -44,7 +44,7 @@ build, '');?> testcase->resultList[$result->caseResult]?> files)) echo html::a("#caseResult{$result->id}", $lang->files . $fileCount, '', "data-toggle='modal' data-type='iframe'")?> - + id,projectID=$testtask->project,buildID=$testtask->build" : '';?>