diff --git a/module/action/lang/de.php b/module/action/lang/de.php index 63e4be9faa..377a19e813 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -233,6 +233,8 @@ $lang->action->label->logout = "Logout"; $lang->action->label->deleteestimate = "deleted "; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; +$lang->action->label->linked2testtask = "linked"; +$lang->action->label->unlinkedfromtesttask = "unlinked"; $lang->action->label->linkchildtask = "linked a child task"; $lang->action->label->unlinkchildrentask = "unlinked a child task"; $lang->action->label->linkparenttask = "linked a parent task"; @@ -251,6 +253,7 @@ $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; $lang->action->label->tracked = 'tracked'; $lang->action->label->hangup = 'hangup'; +$lang->action->label->run = 'run'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 0ae37942c8..64c3f080e3 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -237,6 +237,8 @@ $lang->action->label->logout = "logout"; $lang->action->label->deleteestimate = "deleted "; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; +$lang->action->label->linked2testtask = "linked"; +$lang->action->label->unlinkedfromtesttask = "unlinked"; $lang->action->label->linkchildtask = "linked a child task"; $lang->action->label->unlinkchildrentask = "unlinked a child task"; $lang->action->label->linkparenttask = "linked a parent task"; @@ -255,6 +257,7 @@ $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; $lang->action->label->tracked = 'tracked'; $lang->action->label->hangup = 'hangup'; +$lang->action->label->run = 'run'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index 24f4b6df4b..f71d6dae16 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -233,6 +233,8 @@ $lang->action->label->logout = "s'est Déconnecté"; $lang->action->label->deleteestimate = "a remis à zéro "; $lang->action->label->linked2build = "a ajouté au Build "; $lang->action->label->linked2bug = "a lié au Bug "; +$lang->action->label->linked2testtask = "linked"; +$lang->action->label->unlinkedfromtesttask = "unlinked"; $lang->action->label->linkchildtask = "a raccroché à une sous-tâche"; $lang->action->label->unlinkchildrentask = "a décroché la sous-tâche"; $lang->action->label->linkparenttask = "a raccroché à une tâche parent"; @@ -251,6 +253,7 @@ $lang->action->label->unlinkparentstory = "a décroché de la story parent"; $lang->action->label->deletechildrenstory = "a supprimé la sous-story"; $lang->action->label->tracked = 'tracked'; $lang->action->label->hangup = 'hangup'; +$lang->action->label->run = 'run'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index 044b245a74..042e1e6e4b 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -233,6 +233,8 @@ $lang->action->label->logout = "logout"; $lang->action->label->deleteestimate = "deleted "; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; +$lang->action->label->linked2testtask = "linked"; +$lang->action->label->unlinkedfromtesttask = "unlinked"; $lang->action->label->linkchildtask = "linked a child task"; $lang->action->label->unlinkchildrentask = "hủy liên kết a child task"; $lang->action->label->linkparenttask = "linked a nhiệm vụ cha"; @@ -251,6 +253,7 @@ $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; $lang->action->label->tracked = 'tracked'; $lang->action->label->hangup = 'hangup'; +$lang->action->label->run = 'run'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 492224d685..343ab43152 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -237,6 +237,8 @@ $lang->action->label->logout = "退出登录"; $lang->action->label->deleteestimate = "删除了工时"; $lang->action->label->linked2build = "关联了"; $lang->action->label->linked2bug = "关联了"; +$lang->action->label->linked2testtask = "关联了"; +$lang->action->label->unlinkedfromtesttask = "移除了"; $lang->action->label->linkchildtask = "关联子任务"; $lang->action->label->unlinkchildrentask = "取消关联子任务"; $lang->action->label->linkparenttask = "关联到父任务"; @@ -255,6 +257,7 @@ $lang->action->label->unlinkparentstory = "从父需求取消关联"; $lang->action->label->deletechildrenstory = "删除子需求"; $lang->action->label->tracked = '跟踪了'; $lang->action->label->hangup = '挂起了'; +$lang->action->label->run = '执行了'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/action/model.php b/module/action/model.php index f7353f69fe..ba37fed342 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -72,6 +72,13 @@ class actionModel extends model $action->execution = $build->execution; } + if($objectType == 'case' and (strpos(',linked2testtask,unlinkedfromtesttask,assigned,run,', ',' . $actionType . ',') !== false)) + { + $testtask = $this->dao->select('project,execution')->from(TABLE_TESTTASK)->where('id')->eq((int)$extra)->fetch(); + $action->project = $testtask->project; + $action->execution = $testtask->execution; + } + if($objectType == 'whitelist' and $extra == 'product') $action->product = $objectID; if($objectType == 'whitelist' and $extra == 'project') $action->project = $objectID; if($objectType == 'whitelist' and ($extra == 'sprint' or $extra == 'stage')) $action->execution = $objectID; diff --git a/module/testtask/control.php b/module/testtask/control.php index b9f094b6a9..cb39c961c2 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1077,12 +1077,14 @@ class testtask extends control $response['result'] = 'success'; $response['message'] = ''; + $testRun = $this->dao->select('task,`case`')->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->fetch(); $this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->exec(); if(dao::isError()) { $response['result'] = 'fail'; $response['message'] = dao::getError(); } + $this->loadModel('action')->create('case' ,$testRun->case, 'unlinkedfromtesttask', '', $testRun->task); $this->send($response); } } @@ -1102,6 +1104,8 @@ class testtask extends control ->where('task')->eq((int)$taskID) ->andWhere('`case`')->in($this->post->caseIDList) ->exec(); + $this->loadModel('action'); + foreach($_POST['caseIDList'] as $caseID) $this->action->create('case', $caseID, 'unlinkedfromtesttask', '', $taskID); } die(js::locate($this->createLink('testtask', 'cases', "taskID=$taskID"))); @@ -1134,6 +1138,8 @@ class testtask extends control $caseResult = $this->testtask->createResult($runID); if(dao::isError()) die(js::error(dao::getError())); + $taskID = empty($run->task) ? 0 : $run->task; + $this->loadModel('action')->create('case', $caseID, 'run', '', $taskID); if($caseResult == 'fail') { @@ -1208,6 +1214,8 @@ class testtask extends control if($this->post->results) { $this->testtask->batchRun($from, $taskID); + $this->loadModel('action'); + foreach(array_keys($this->post->results) as $caseID) $this->action->create('case', $caseID, 'run', '', $taskID); die(js::locate($url, 'parent')); } @@ -1217,7 +1225,18 @@ class testtask extends control /* The case of tasks of qa. */ if($productID or ($this->app->openApp == 'project' and empty($productID))) { - $this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->loadModel('qa')->setMenu($this->products, $productID, $taskID); + if($this->app->openApp == 'project') + { + $this->loadModel('project')->setMenu($this->session->project); + } + elseif($this->app->openApp == 'execution') + { + $this->loadModel('execution')->setMenu($this->session->execution); + } + else + { + $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'); @@ -1324,6 +1343,8 @@ class testtask extends control ->where('task')->eq((int)$taskID) ->andWhere('`case`')->in($this->post->caseIDList) ->exec(); + $this->loadModel('action'); + foreach($this->post->caseIDList as $caseID) $this->action->create('case', $caseID, 'assigned', '', $taskID); die(js::locate($this->session->caseList, 'parent')); } diff --git a/module/testtask/model.php b/module/testtask/model.php index aa7c293c6f..0d5c869e53 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -882,8 +882,10 @@ class testtaskModel extends model $data->version = 1; $data->order = ++ $lastOrder; $this->dao->replace(TABLE_PROJECTCASE)->data($data)->exec(); + $this->loadModel('action')->create('case', $caseID, 'linked2testtask', '', $taskID); } } + } /**