From 9ef2f028c284467871f4cb956ead9abbde560cfd Mon Sep 17 00:00:00 2001 From: Yagami Date: Tue, 11 Sep 2018 10:20:56 +0800 Subject: [PATCH] * Fix groupcase method. --- module/testtask/control.php | 3 ++- module/testtask/lang/en.php | 1 + module/testtask/lang/zh-cn.php | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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/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 = '所有用例';