diff --git a/module/testcase/control.php b/module/testcase/control.php index aeb2164d89..eb57fa0cbf 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2400,6 +2400,9 @@ class testcase extends control if(dao::isError()) return print(js::error(dao::getError())); + if(!empty($_POST['syncToZentao'])) + $this->zanode->syncCasesToZentao($_POST['scriptPath']); + $nodeID = $_POST['node']; $node = $this->zanode->getNodeByID($_POST['node']); diff --git a/module/testcase/view/automation.html.php b/module/testcase/view/automation.html.php index f14d333418..18ed3759e6 100644 --- a/module/testcase/view/automation.html.php +++ b/module/testcase/view/automation.html.php @@ -48,6 +48,10 @@ + + + $lang->zanode->syncToZentao), '');?> + zanode->shell;?> diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index a066079d06..73b15677bc 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -53,6 +53,7 @@ $lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this sna $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; $lang->zanode->scriptPath = "Script path"; +$lang->zanode->syncToZentao = "Sync cases in the directory to Zentao"; $lang->zanode->shell = "Shell"; $lang->zanode->automation = "Automation"; $lang->zanode->install = "Install"; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index d5079ea53f..9ad66b6437 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -53,6 +53,7 @@ $lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this sna $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; $lang->zanode->scriptPath = "Script path"; +$lang->zanode->syncToZentao = "Sync cases in the directory to Zentao"; $lang->zanode->shell = "Shell"; $lang->zanode->automation = "Automation"; $lang->zanode->install = "Install"; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index dd4710ced0..205dfdd246 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -53,6 +53,7 @@ $lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this sna $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; $lang->zanode->scriptPath = "Script path"; +$lang->zanode->syncToZentao = "Sync cases in the directory to Zentao"; $lang->zanode->shell = "Shell"; $lang->zanode->automation = "Automation"; $lang->zanode->install = "Install"; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index 794e92aca1..525b670ebe 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -53,6 +53,7 @@ $lang->zanode->confirmRestore = "执行节点将会还原至此快照状态, $lang->zanode->actionSuccess = '操作成功'; $lang->zanode->deleted = "已删除"; $lang->zanode->scriptPath = "脚本目录"; +$lang->zanode->syncToZentao = "同步脚本信息到禅道"; $lang->zanode->shell = "shell命令"; $lang->zanode->automation = "自动化设置"; $lang->zanode->install = "安装"; diff --git a/module/zanode/model.php b/module/zanode/model.php index 5b7d9b41cd..a4af071481 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -1088,6 +1088,7 @@ class zanodemodel extends model { $now = helper::now(); $data = fixer::input('post') + ->remove('syncToZentao') ->setDefault('createdBy', $this->app->user->account) ->setDefault('createdDate', $now) ->setDefault('node', 0) @@ -1138,4 +1139,14 @@ class zanodemodel extends model return dao::$errors = $this->lang->zanode->runTimeout; } } + + /** + * Sync cases in dir to zentao. + * + * @access public + * @return void + */ + public function syncCasesToZentao($path) + { + } }