From 5c1ef6e4f2c73b27a00009a3f341afe804fc371d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 10:42:48 +0800 Subject: [PATCH 01/14] =?UTF-8?q?Finish=20task#3299=20=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E9=A1=B5=E9=9D=A2=E4=B8=8D=E8=83=BD=E6=8B=96?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=88=97=E9=A2=9C=E8=89=B2=E4=B8=8A=E7=BB=99?= =?UTF-8?q?=E5=87=BA=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=BE=80=E5=8F=B3=E6=8B=96?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=89=80=E6=9C=89=E7=BB=8F=E8=BF=87?= =?UTF-8?q?=E7=9A=84=E5=88=97=E9=A2=9C=E8=89=B2=E9=83=BD=E5=8F=98=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=96=87=E6=A1=88?= =?UTF-8?q?=E6=94=B9=E6=88=90=EF=BC=9A=E7=94=B1XXX=E9=AA=8C=E6=94=B6,cost:?= =?UTF-8?q?0.5=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/action/lang/en.php | 3 +++ module/action/lang/zh-cn.php | 3 +++ module/project/css/storykanban.css | 13 ++++++------- module/project/view/story.html.php | 8 +++++--- module/project/view/storykanban.html.php | 19 +++++++++---------- module/story/control.php | 4 +++- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/module/action/lang/en.php b/module/action/lang/en.php index b82e62f4db..af2b86eb59 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -110,6 +110,7 @@ $lang->action->desc->svncommited = '$date, submitted by $actoraction->desc->gitcommited = '$date, submitted by $actor and the version is #$extra.' . "\n"; $lang->action->desc->finished = '$date, finished by $actor.' . "\n"; $lang->action->desc->paused = '$date, paused by $actor.' . "\n"; +$lang->action->desc->verified = '$date, verified by $actor.' . "\n"; $lang->action->desc->diff1 = '%s has been changed. Its value was "%s" and the new value is "%s".
' . "\n"; $lang->action->desc->diff2 = '%s has been changed. The difference is ' . "\n" . "
%s
" . "\n"; $lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n"; @@ -171,6 +172,7 @@ $lang->action->label->editestimate = 'Edited Man-Hour'; $lang->action->label->canceled = 'Cancelled'; $lang->action->label->finished = 'Finished'; $lang->action->label->paused = 'Paused'; +$lang->action->label->paused = 'Verified'; $lang->action->label->delayed = 'Delayed'; $lang->action->label->suspended = 'Suspended'; $lang->action->label->login = 'Login'; @@ -262,5 +264,6 @@ $lang->action->search->label['editestimate'] = $lang->action->label->edit $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; $lang->action->search->label['paused'] = $lang->action->label->paused; +$lang->action->search->label['verified'] = $lang->action->label->verified; $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 96e6aa1ca1..86a3f4edcf 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -112,6 +112,7 @@ $lang->action->desc->svncommited = '$date, 由 $actor 提交 $lang->action->desc->gitcommited = '$date, 由 $actor 提交代码,版本为#$extra。' . "\n"; $lang->action->desc->finished = '$date, 由 $actor 完成。' . "\n"; $lang->action->desc->paused = '$date, 由 $actor 暂停。' . "\n"; +$lang->action->desc->verified = '$date, 由 $actor 验收。' . "\n"; $lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
' . "\n"; $lang->action->desc->diff2 = '修改了 %s,区别为:' . "\n" . "
%s
" . "\n"; $lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n"; @@ -173,6 +174,7 @@ $lang->action->label->editestimate = '编辑了工时'; $lang->action->label->canceled = '取消了'; $lang->action->label->finished = '完成了'; $lang->action->label->paused = '暂停了'; +$lang->action->label->verified = '验收了'; $lang->action->label->delayed = '延期'; $lang->action->label->suspended = '挂起'; $lang->action->label->login = '登录系统'; @@ -266,5 +268,6 @@ $lang->action->search->label['editestimate'] = $lang->action->label->edit $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; $lang->action->search->label['paused'] = $lang->action->label->paused; +$lang->action->search->label['verified'] = $lang->action->label->verified; $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; diff --git a/module/project/css/storykanban.css b/module/project/css/storykanban.css index 2a46209874..bf48fab63b 100644 --- a/module/project/css/storykanban.css +++ b/module/project/css/storykanban.css @@ -12,7 +12,6 @@ #kanbanWrapper tbody td {vertical-align: top; padding: 6px} #kanbanWrapper tbody th {background: #f1f1f1} #kanbanWrapper .board-shadow {height: 0; opacity: 0; transition: opacity 0.2s;} -#kanbanWrapper tbody tr.dragging td.col-droppable {background: #fff4e5} #kanbanWrapper tbody tr.dragging td.col-droppable.drop-to {background: #ffeacc} #kanbanWrapper tbody tr.dragging td.col-droppable.drop-to .board-story + .board-shadow {margin-top: 6px;} #kanbanWrapper tbody tr.dragging td.col-droppable.drop-to .board-shadow {height: 28px; background: #999; background: rgba(0,0,0,0.35); opacity: 1;} @@ -56,12 +55,12 @@ .story-pri.pri-4 {background-color:#795523;} .board-story {color: #dd7503; background-color: #FFF3E0;} -.board-story.stage-projected {color:#777;} -.board-story.stage-developing {color:#D2322D; background-color: #FFEBEE;} -.board-story.stage-developed {color:#229F24; background-color: #E8F5E9;} -.board-story.stage-testing {color:#EF6C00; background-color: #FFF3E0;} -.board-story.stage-tested {color:#827717; background-color: #F9FBE7} -.board-story.stage-released {color:#9C27B0; background-color: #F3E5F5} +.board-story.board-story-projected {color:#777;} +.board-story.board-story-developing {color:#D2322D; background-color: #FFEBEE;} +.board-story.board-story-developed {color:#229F24; background-color: #E8F5E9;} +.board-story.board-story-testing {color:#EF6C00; background-color: #FFF3E0;} +.board-story.board-story-tested {color:#827717; background-color: #F9FBE7} +.board-story.board-story-released {color:#9C27B0; background-color: #F3E5F5} .affix {position:fixed; top:0px; width:95%;z-index:1030;} #kanbanHeader.affix {box-shadow: 0 3px 10px rgba(0,0,0,.1);} diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index d66a3a994a..b416ef606e 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -16,12 +16,14 @@ project->confirmUnlinkStory)?> -
-
icons['story']);?> project->story;?>
+
+
id", '', 'button', 'columns', '', '', '', '', $lang->project->kanban); common::printIcon('story', 'export', "productID=$productID&orderBy=id_desc", '', 'button', '', '', 'export'); $this->lang->story->create = $this->lang->project->createStory; diff --git a/module/project/view/storykanban.html.php b/module/project/view/storykanban.html.php index 21fe7bb2f1..969cfd34c7 100644 --- a/module/project/view/storykanban.html.php +++ b/module/project/view/storykanban.html.php @@ -10,12 +10,14 @@ ?> project->confirmUnlinkStory)?> -
-
icons['story']);?> project->story;?>
+
+
id", '', 'button', 'list', '', '', '', '', $lang->project->story); common::printIcon('story', 'export', "productID=$productID&orderBy=id_desc", '', 'button', '', '', 'export'); $this->lang->story->create = $this->lang->project->createStory; @@ -43,15 +45,12 @@ $account = $this->app->user->account - -
story->stageList[$col];?> story->stageList[$endCol];?>
- @@ -64,7 +63,7 @@ $account = $this->app->user->account
-
+
createLink('story', 'view', "story=$story->id", '', true), $story->title, '', 'class="kanbanFrame" title="' . $story->title . '"');?>
@@ -80,10 +79,10 @@ $account = $this->app->user->account
diff --git a/module/story/control.php b/module/story/control.php index f7d6a5b7e4..ae815aba81 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -933,9 +933,11 @@ class story extends control $storyIDList = array_unique($storyIDList); $allChanges = $this->story->batchChangeStage($storyIDList, $stage); if(dao::isError()) die(js::error(dao::getError())); + + $action = $stage == 'verified' ? 'Verified' : 'Edited'; foreach($allChanges as $storyID => $changes) { - $actionID = $this->action->create('story', $storyID, 'Edited'); + $actionID = $this->action->create('story', $storyID, $action); $this->action->logHistory($actionID, $changes); $this->story->sendmail($storyID, $actionID); } From e8cdfe2bff922e86ba40ef29a1f5c92543e9f7d4 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 2 Nov 2017 11:35:52 +0800 Subject: [PATCH 02/14] + Add en lang files. * Finish task 3292,3293,3294,3305,3306,3307,3308,3309. --- db/update9.5.1.sql | 4 +- module/common/lang/en.php | 18 +++---- module/common/lang/menuOrder.php | 1 - module/common/lang/zh-cn.php | 18 +++---- module/entry/lang/en.php | 35 ++++++++++++ module/entry/lang/zh-cn.php | 2 - module/product/control.php | 31 ++++++----- module/product/lang/en.php | 2 + module/product/lang/zh-cn.php | 2 +- module/product/model.php | 12 ++--- module/product/view/all.html.php | 18 ++++--- module/product/view/create.html.php | 6 +-- module/product/view/edit.html.php | 6 +-- module/product/view/view.html.php | 4 +- module/tree/control.php | 12 ++--- module/tree/lang/en.php | 4 ++ module/tree/lang/zh-cn.php | 82 ++++++++++++++--------------- module/tree/model.php | 21 +++++--- module/tree/view/browse.html.php | 14 ++--- module/webhook/config.php | 3 -- module/webhook/control.php | 5 +- module/webhook/js/create.js | 13 ++++- module/webhook/js/edit.js | 12 +++++ module/webhook/lang/en.php | 62 ++++++++++++++++++++++ module/webhook/lang/zh-cn.php | 2 +- module/webhook/model.php | 38 ++++++------- module/webhook/view/browse.html.php | 6 +-- module/webhook/view/create.html.php | 19 ++++--- module/webhook/view/edit.html.php | 19 ++++--- module/webhook/view/header.html.php | 2 +- 30 files changed, 301 insertions(+), 172 deletions(-) create mode 100644 module/entry/lang/en.php create mode 100644 module/webhook/lang/en.php diff --git a/db/update9.5.1.sql b/db/update9.5.1.sql index 8928bb3a17..8e729a639e 100644 --- a/db/update9.5.1.sql +++ b/db/update9.5.1.sql @@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` ( `type` varchar(10) NOT NULL DEFAULT 'default', `name` varchar(50) NOT NULL, `url` varchar(255) NOT NULL, - `contentType` enum('json','form') NOT NULL DEFAULT 'json', + `contentType` varchar(30) NOT NULL DEFAULT 'application/json', `sendType` enum('sync','async') NOT NULL DEFAULT 'sync', `products` text NOT NULL, `projects` text NOT NULL, @@ -56,7 +56,7 @@ CREATE TABLE IF NOT EXISTS `zt_log` ( `action` mediumint(8) unsigned NOT NULL, `date` datetime NOT NULL, `url` varchar(255) NOT NULL, - `contentType` varchar(40) NOT NULL, + `contentType` varchar(30) NOT NULL, `data` text NOT NULL, `result` text NOT NULL, PRIMARY KEY `id` (`id`), diff --git a/module/common/lang/en.php b/module/common/lang/en.php index c2d556c299..5eeab17c66 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -345,7 +345,7 @@ $lang->admin->menu->safe = array('link' => 'Security|admin|safe', 'alias' = $lang->admin->menu->cron = array('link' => 'Cron|cron|index', 'subModule' => 'cron'); $lang->admin->menu->trashes = array('link' => 'Recycle|action|trash', 'subModule' => 'action'); $lang->admin->menu->dev = array('link' => 'Develop|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor'); -$lang->admin->menu->entry = array('link' => 'API|entry|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook'); +$lang->admin->menu->api = array('link' => 'API|webhook|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook'); $lang->admin->menu->sso = 'RangerTeam|admin|sso'; $lang->convert = new stdclass(); @@ -434,14 +434,14 @@ $lang->error->editedByOther = 'This record might have been changed. Please ref $lang->error->tutorialData = 'No data can be imported in tutorial mode. Please exit tutorial first!'; $lang->error->entry = array(); -$lang->error->entry['300001'] = 'Param code not set.'; -$lang->error->entry['300002'] = 'Param token not set.'; -$lang->error->entry['310001'] = 'Entry not exist.'; -$lang->error->entry['310002'] = 'Key of entry not set.'; -$lang->error->entry['320001'] = 'IP denied.'; -$lang->error->entry['330001'] = 'Invalid token.'; -$lang->error->entry['340001'] = 'Session code not set.'; -$lang->error->entry['340002'] = 'Session verify failed.'; +$lang->error->entry['301'] = 'Param code not set.'; +$lang->error->entry['302'] = 'Param token not set.'; +$lang->error->entry['311'] = 'Entry not exist.'; +$lang->error->entry['312'] = 'Key of entry not set.'; +$lang->error->entry['321'] = 'IP denied.'; +$lang->error->entry['331'] = 'Invalid token.'; +$lang->error->entry['341'] = 'Session code not set.'; +$lang->error->entry['342'] = 'Session verify failed.'; /* 分页信息。*/ $lang->pager = new stdclass(); diff --git a/module/common/lang/menuOrder.php b/module/common/lang/menuOrder.php index 46975fc04f..03dd92422e 100644 --- a/module/common/lang/menuOrder.php +++ b/module/common/lang/menuOrder.php @@ -40,7 +40,6 @@ $lang->product->menuOrder[40] = 'doc'; $lang->product->menuOrder[45] = 'project'; $lang->product->menuOrder[50] = 'branch'; $lang->product->menuOrder[55] = 'module'; -$lang->product->menuOrder[57] = 'category'; $lang->product->menuOrder[60] = 'view'; $lang->product->menuOrder[65] = 'create'; $lang->product->menuOrder[70] = 'all'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index b6b235bfa2..fcadd102fb 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -345,7 +345,7 @@ $lang->admin->menu->safe = array('link' => '安全|admin|safe', 'alias' => $lang->admin->menu->cron = array('link' => '计划任务|cron|index', 'subModule' => 'cron'); $lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action'); $lang->admin->menu->dev = array('link' => '二次开发|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor'); -$lang->admin->menu->entry = array('link' => '接口|entry|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook'); +$lang->admin->menu->api = array('link' => '接口|webhook|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook'); $lang->admin->menu->sso = '然之集成|admin|sso'; $lang->convert = new stdclass(); @@ -434,14 +434,14 @@ $lang->error->editedByOther = '该记录可能已经被改动。请刷新页 $lang->error->tutorialData = '新手模式下不会插入数据,请退出新手模式操作'; $lang->error->entry = array(); -$lang->error->entry['300001'] = '缺少code参数'; -$lang->error->entry['300002'] = '缺少token参数'; -$lang->error->entry['310001'] = '应用不存在'; -$lang->error->entry['310002'] = '应用未设置密钥'; -$lang->error->entry['320001'] = '该IP访问被限制访问'; -$lang->error->entry['330001'] = '不合法的token参数'; -$lang->error->entry['340001'] = '缺少session code'; -$lang->error->entry['340002'] = 'session验证失败'; +$lang->error->entry['301'] = '缺少code参数'; +$lang->error->entry['302'] = '缺少token参数'; +$lang->error->entry['311'] = '应用不存在'; +$lang->error->entry['312'] = '应用未设置密钥'; +$lang->error->entry['321'] = '该IP访问被限制访问'; +$lang->error->entry['331'] = '不合法的token参数'; +$lang->error->entry['341'] = '缺少session code'; +$lang->error->entry['342'] = 'session验证失败'; /* 分页信息。*/ $lang->pager = new stdclass(); diff --git a/module/entry/lang/en.php b/module/entry/lang/en.php new file mode 100644 index 0000000000..554f6650b1 --- /dev/null +++ b/module/entry/lang/en.php @@ -0,0 +1,35 @@ +entry->common = 'Entry'; +$lang->entry->list = 'Entry List'; +$lang->entry->api = 'API'; +$lang->entry->webhook = 'Webhook'; +$lang->entry->log = 'Log'; + +$lang->entry->browse = 'Browse'; +$lang->entry->create = 'Create'; +$lang->entry->edit = 'Edit'; +$lang->entry->delete = 'Delete'; +$lang->entry->createKey = 'Regenerate'; + +$lang->entry->id = 'ID'; +$lang->entry->name = 'Name'; +$lang->entry->code = 'Code'; +$lang->entry->key = 'Key'; +$lang->entry->ip = 'IP'; +$lang->entry->desc = 'Desc'; +$lang->entry->createdBy = 'Created By'; +$lang->entry->createdDate = 'Created Date'; +$lang->entry->editedby = 'Edited By'; +$lang->entry->editedDate = 'Edited Date'; +$lang->entry->date = 'Request Time'; +$lang->entry->url = 'Request URL'; + +$lang->entry->saveSuccess = 'Save success.'; +$lang->entry->confirmDelete = 'Are you sure delete this entry?'; +$lang->entry->help = 'Help'; + +$lang->entry->note = new stdClass(); +$lang->entry->note->name = 'Name'; +$lang->entry->note->code = 'Code, should be english and number.'; +$lang->entry->note->ip = "Use comma between two IPs. IP segment is supported, e.g. 192.168.1.*"; +$lang->entry->note->allIP = 'All'; diff --git a/module/entry/lang/zh-cn.php b/module/entry/lang/zh-cn.php index f4e6afd4d0..c3cfb65352 100644 --- a/module/entry/lang/zh-cn.php +++ b/module/entry/lang/zh-cn.php @@ -3,7 +3,6 @@ $lang->entry->common = '应用'; $lang->entry->list = '应用列表'; $lang->entry->api = '接口'; $lang->entry->webhook = 'webhook'; -$lang->entry->dingding = '钉钉'; $lang->entry->log = '日志'; $lang->entry->browse = '浏览应用'; @@ -25,7 +24,6 @@ $lang->entry->editedDate = '编辑时间'; $lang->entry->date = '请求时间'; $lang->entry->url = '请求地址'; -$lang->entry->apiIndex = '应用入口'; $lang->entry->saveSuccess = '保存成功'; $lang->entry->confirmDelete = '您确认要删除该应用吗?'; $lang->entry->help = '使用说明'; diff --git a/module/product/control.php b/module/product/control.php index 2310c03d58..cd6b39f21a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -231,7 +231,7 @@ class product extends control $this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst|noclosed'); $this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed'); $this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed'); - $this->view->categories = $this->loadModel('tree')->getOptionMenu($rootID = 0, $type = 'category'); + $this->view->lines = array('') + $this->loadModel('tree')->getLinePairs(); unset($this->lang->product->typeList['']); $this->display(); @@ -276,7 +276,7 @@ class product extends control $this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst', $product->PO); $this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst', $product->QD); $this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst', $product->RD); - $this->view->categories = $this->loadModel('tree')->getOptionMenu($rootID = 0, $type = 'category'); + $this->view->lines = array('') + $this->loadModel('tree')->getLinePairs(); unset($this->lang->product->typeList['']); $this->display(); @@ -394,7 +394,7 @@ class product extends control $this->view->actions = $this->loadModel('action')->getList('product', $productID); $this->view->users = $this->user->getPairs('noletter'); $this->view->groups = $this->loadModel('group')->getPairs(); - $this->view->categories = $this->loadModel('tree')->getOptionMenu($rootID = 0, $type = 'category'); + $this->view->lines = array('') + $this->loadModel('tree')->getLinePairs(); $this->display(); } @@ -586,20 +586,22 @@ class product extends control foreach($products as $key => $product) $product->key = $productsPinyin[$product->name]; - /* Sort products as categories' order first. */ - $categories = $this->loadModel('tree')->getOptionMenu($rootID = 0, $type = 'category'); + /* Sort products as lines' order first. */ + $lines = $this->loadModel('tree')->getLinePairs(); $productList = array(); - foreach($categories as $id => $category) + foreach($lines as $id => $name) { - foreach($products as $product) + foreach($products as $key => $product) { - if($product->category == $id) + if($product->line == $id) { - $product->name = ltrim($category. '/' . $product->name, '/'); + $product->name = $name . '/' . $product->name; $productList[] = $product; + unset($products[$key]); } } } + $productList = array_merge($productList, $products); $this->view->products = $productList; $this->display(); @@ -648,7 +650,7 @@ class product extends control * All product. * * @param int $productID - * @param int $category + * @param int $line * @param string $status * @param string $orderBy * @param int $recTotal @@ -657,7 +659,7 @@ class product extends control * @access public * @return void */ - public function all($productID = 0, $category = 0, $status = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 10, $pageID = 1) + public function all($productID = 0, $line = 0, $status = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 10, $pageID = 1) { $this->session->set('productList', $this->app->getURI(true)); $productID = $this->product->saveState($productID, $this->products); @@ -670,10 +672,11 @@ class product extends control $this->app->loadLang('my'); $this->view->title = $this->lang->product->allProduct; $this->view->position[] = $this->lang->product->allProduct; - $this->view->productStats = $this->product->getStats($orderBy, $pager, $status, $category); - $this->view->categoryTree = $this->loadModel('tree')->getTreeMenu(0, $viewType = 'category', $startModuleID = 0, array('treeModel', 'createCategoryLink'), array('productID' => $productID, 'status' => $status)); + $this->view->productStats = $this->product->getStats($orderBy, $pager, $status, $line); + $this->view->lineTree = $this->loadModel('tree')->getTreeMenu(0, $viewType = 'line', $startModuleID = 0, array('treeModel', 'createLineLink'), array('productID' => $productID, 'status' => $status)); + $this->view->lines = array('') + $this->tree->getLinePairs(); $this->view->productID = $productID; - $this->view->category = $category; + $this->view->line = $line; $this->view->status = $status; $this->view->orderBy = $orderBy; $this->view->pager = $pager; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 6d2a7c0556..7dde6aec3d 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -55,8 +55,10 @@ $lang->product->confirmDelete = " Do you want to delete {$lang->productCommon} $lang->product->errorNoProduct = "{$lang->productCommon} is not created yet!"; $lang->product->accessDenied = "You have no access to {$lang->productCommon}."; +$lang->product->id = 'ID'; $lang->product->name = "{$lang->productCommon} Name"; $lang->product->code = "{$lang->productCommon} Code"; +$lang->product->line = 'Product Line'; $lang->product->order = 'Sort'; $lang->product->type = "{$lang->productCommon} Type"; $lang->product->status = 'Status'; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 97965e4da6..7c5caaa86f 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -58,7 +58,7 @@ $lang->product->accessDenied = "您无权访问该{$lang->productCommon}"; $lang->product->id = "编号"; $lang->product->name = "{$lang->productCommon}名称"; $lang->product->code = "{$lang->productCommon}代号"; -$lang->product->category = "{$lang->productCommon}目录"; +$lang->product->line = '产品线'; $lang->product->order = '排序'; $lang->product->type = "{$lang->productCommon}类型"; $lang->product->status = '状态'; diff --git a/module/product/model.php b/module/product/model.php index 0f44888c01..25f2cab5ba 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -203,15 +203,15 @@ class productModel extends model * * @param string $status * @param int $limit - * @param int $category + * @param int $line * @access public * @return array */ - public function getList($status = 'all', $limit = 0, $category = 0) + public function getList($status = 'all', $limit = 0, $line = 0) { return $this->dao->select('*')->from(TABLE_PRODUCT) ->where('deleted')->eq(0) - ->beginIF($category > 0)->andWhere('category')->eq($category)->fi() + ->beginIF($line > 0)->andWhere('line')->eq($line)->fi() ->beginIF($status == 'noclosed')->andWhere('status')->ne('closed')->fi() ->beginIF($status != 'all' and $status != 'noclosed' and $status != 'involved')->andWhere('status')->in($status)->fi() ->beginIF($status == 'involved') @@ -670,17 +670,17 @@ class productModel extends model * @param string $orderBy * @param object $pager * @param string $status - * @param int $category + * @param int $line * @access public * @return array */ - public function getStats($orderBy = 'order_desc', $pager = null, $status = 'noclosed', $category = 0) + public function getStats($orderBy = 'order_desc', $pager = null, $status = 'noclosed', $line = 0) { $this->loadModel('report'); $this->loadModel('story'); $this->loadModel('bug'); - $products = $this->getList($status, $limit = 0, $category); + $products = $this->getList($status, $limit = 0, $line); foreach($products as $productID => $product) { if(!$this->checkPriv($product)) unset($products[$productID]); diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index dfdb47bd47..59a7ea0959 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -20,9 +20,9 @@ createLink('product', 'create'), " " . $lang->product->create,'', "class='btn'") ?>
@@ -30,11 +30,11 @@
-
icons['product']);?> product->category;?>
+
icons['product']);?> product->line;?>
- +
- tree->manageCategory);?> + tree->manageLine);?>
@@ -58,11 +58,12 @@
' id='productsForm'> - recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + @@ -88,6 +89,7 @@ createLink('product', 'view', 'product=' . $product->id), sprintf('%03d', $product->id));?> + @@ -111,7 +113,7 @@ product->batchEdit);?> - recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->product->updateOrder, '' , "class='btn'");?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->product->updateOrder, '' , "class='btn'");?> show();?> diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php index 455a512e42..f905b5854b 100644 --- a/module/product/view/create.html.php +++ b/module/product/view/create.html.php @@ -31,9 +31,9 @@ - - - + + + diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php index 20636ca010..66079ccabb 100644 --- a/module/product/view/edit.html.php +++ b/module/product/view/edit.html.php @@ -32,9 +32,9 @@ - - - + + + diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index a418237504..7df3c6d4df 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -70,8 +70,8 @@ - - + + diff --git a/module/tree/control.php b/module/tree/control.php index a6c121eba0..e89226a47b 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -25,7 +25,7 @@ class tree extends control public function browse($rootID, $viewType, $currentModuleID = 0, $branch = 0) { /* According to the type, set the module root and modules. */ - if(strpos('story|bug|case|category', $viewType) !== false) + if(strpos('story|bug|case|line', $viewType) !== false) { $product = $this->loadModel('product')->getById($rootID); if(!empty($product->type) && $product->type != 'normal') @@ -122,10 +122,10 @@ class tree extends control $position[] = html::a($this->createLink('doc', 'browse', "libID=$rootID"), $lib->name); $position[] = $this->lang->tree->manageCustomDoc; } - elseif($viewType == 'category') + elseif($viewType == 'line') { $this->lang->set('menugroup.tree', 'product'); - $this->product->setMenu($this->product->getPairs(), $rootID, $branch, 'category', '', 'category'); + $this->product->setMenu($this->product->getPairs(), $rootID, $branch, 'line', '', 'line'); $this->lang->tree->menu = $this->lang->product->menu; $this->lang->tree->menuOrder = $this->lang->product->menuOrder; @@ -135,10 +135,10 @@ class tree extends control $this->view->allProduct = $products; $this->view->currentProduct = $currentProduct; - $this->view->productModules = $this->tree->getOptionMenu($currentProduct, 'category'); + $this->view->productModules = $this->tree->getOptionMenu($currentProduct, 'line'); - $title = $this->lang->product->common . $this->lang->colon . $this->lang->tree->manageCategory; - $position[] = $this->lang->tree->manageCategory; + $title = $this->lang->product->common . $this->lang->colon . $this->lang->tree->manageLine; + $position[] = $this->lang->tree->manageLine; } $parentModules = $this->tree->getParents($currentModuleID); diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php index 922c6701c2..85014d7855 100644 --- a/module/tree/lang/en.php +++ b/module/tree/lang/en.php @@ -19,6 +19,7 @@ $lang->tree->manage = 'Manage Module'; $lang->tree->fix = 'Fix'; $lang->tree->manageProduct = "Manage {$lang->productCommon}"; $lang->tree->manageProject = "Manage {$lang->projectCommon}"; +$lang->tree->manageLine = 'Manage Product Line'; $lang->tree->manageBug = 'Manage Bug'; $lang->tree->manageCase = 'Manage Case'; $lang->tree->manageCaseLib = 'Manage Library'; @@ -26,6 +27,7 @@ $lang->tree->manageCustomDoc = 'Manage DocLib'; $lang->tree->updateOrder = 'Update Order'; $lang->tree->manageChild = 'Manage Child Module'; $lang->tree->manageStoryChild = 'Manage Child Story'; +$lang->tree->manageLineChild = 'Manage Product Line'; $lang->tree->manageBugChild = 'Manage Child Bug'; $lang->tree->manageCaseChild = 'Manage Child Case'; $lang->tree->manageCaselibChild = 'Manage Child Library'; @@ -42,12 +44,14 @@ $lang->tree->successFixed = 'Fixed.'; $lang->tree->repeatName = 'The name "%s" has existed!'; $lang->tree->name = 'Name'; +$lang->tree->line = 'Product Line'; $lang->tree->root = 'Root'; $lang->tree->branch = 'Platform/Branch'; $lang->tree->path = 'Path'; $lang->tree->type = 'Type'; $lang->tree->parent = 'Parent'; $lang->tree->child = 'Child'; +$lang->tree->lineChild = 'Child'; $lang->tree->owner = 'Owner'; $lang->tree->order = 'Order'; $lang->tree->short = 'Sort'; diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php index cf89418e67..86eb26b98c 100644 --- a/module/tree/lang/zh-cn.php +++ b/module/tree/lang/zh-cn.php @@ -10,32 +10,32 @@ * @link http://www.zentao.net */ $lang->tree = new stdclass(); -$lang->tree->common = '模块维护'; -$lang->tree->edit = '编辑'; -$lang->tree->delete = '删除模块'; -$lang->tree->browse = '通用模块维护'; -$lang->tree->browseTask = '任务模块维护'; -$lang->tree->manage = '维护模块'; -$lang->tree->fix = '修正数据'; -$lang->tree->manageProduct = "维护{$lang->productCommon}视图模块"; -$lang->tree->manageProject = "维护{$lang->projectCommon}视图模块"; -$lang->tree->manageCategory = '维护目录'; -$lang->tree->manageBug = '维护测试视图模块'; -$lang->tree->manageCase = '维护用例视图模块'; -$lang->tree->manageCaseLib = '维护测试库模块'; -$lang->tree->manageCustomDoc = '维护文档库分类'; -$lang->tree->updateOrder = '更新排序'; -$lang->tree->manageChild = '维护子模块'; -$lang->tree->manageStoryChild = '维护子模块'; -$lang->tree->manageCategoryChild = '维护子目录'; -$lang->tree->manageBugChild = '维护Bug子模块'; -$lang->tree->manageCaseChild = '维护用例子模块'; -$lang->tree->manageCaselibChild = '维护测试库子模块'; -$lang->tree->manageTaskChild = "维护{$lang->projectCommon}子模块"; -$lang->tree->syncFromProduct = '复制'; -$lang->tree->dragAndSort = "拖放排序"; -$lang->tree->sort = "排序"; -$lang->tree->addChild = "增加子模块"; +$lang->tree->common = '模块维护'; +$lang->tree->edit = '编辑'; +$lang->tree->delete = '删除模块'; +$lang->tree->browse = '通用模块维护'; +$lang->tree->browseTask = '任务模块维护'; +$lang->tree->manage = '维护模块'; +$lang->tree->fix = '修正数据'; +$lang->tree->manageProduct = "维护{$lang->productCommon}视图模块"; +$lang->tree->manageProject = "维护{$lang->projectCommon}视图模块"; +$lang->tree->manageLine = '维护产品线'; +$lang->tree->manageBug = '维护测试视图模块'; +$lang->tree->manageCase = '维护用例视图模块'; +$lang->tree->manageCaseLib = '维护测试库模块'; +$lang->tree->manageCustomDoc = '维护文档库分类'; +$lang->tree->updateOrder = '更新排序'; +$lang->tree->manageChild = '维护子模块'; +$lang->tree->manageStoryChild = '维护子模块'; +$lang->tree->manageLineChild = '维护产品线'; +$lang->tree->manageBugChild = '维护Bug子模块'; +$lang->tree->manageCaseChild = '维护用例子模块'; +$lang->tree->manageCaselibChild = '维护测试库子模块'; +$lang->tree->manageTaskChild = "维护{$lang->projectCommon}子模块"; +$lang->tree->syncFromProduct = '复制'; +$lang->tree->dragAndSort = "拖放排序"; +$lang->tree->sort = "排序"; +$lang->tree->addChild = "增加子模块"; $lang->tree->confirmDelete = '该模块及其子模块都会被删除,您确定删除吗?'; $lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的需求、Bug、用例的所属{$lang->productCommon},以及{$lang->projectCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?"; @@ -43,18 +43,18 @@ $lang->tree->successSave = '成功保存'; $lang->tree->successFixed = '成功修正数据!'; $lang->tree->repeatName = '模块名“%s”已经存在!'; -$lang->tree->name = '模块名称'; -$lang->tree->category = '目录名称'; -$lang->tree->root = '所属根'; -$lang->tree->branch = '平台/分支'; -$lang->tree->path = '路径'; -$lang->tree->type = '类型'; -$lang->tree->parent = '上级模块'; -$lang->tree->child = '子模块'; -$lang->tree->categoryChild = '子目录'; -$lang->tree->owner = '负责人'; -$lang->tree->order = '排序'; -$lang->tree->short = '简称'; -$lang->tree->all = '所有模块'; -$lang->tree->projectDoc = "{$lang->projectCommon}文档"; -$lang->tree->product = "所属{$lang->productCommon}"; +$lang->tree->name = '模块名称'; +$lang->tree->line = '产品线名称'; +$lang->tree->root = '所属根'; +$lang->tree->branch = '平台/分支'; +$lang->tree->path = '路径'; +$lang->tree->type = '类型'; +$lang->tree->parent = '上级模块'; +$lang->tree->child = '子模块'; +$lang->tree->lineChild = '子产品线'; +$lang->tree->owner = '负责人'; +$lang->tree->order = '排序'; +$lang->tree->short = '简称'; +$lang->tree->all = '所有模块'; +$lang->tree->projectDoc = "{$lang->projectCommon}文档"; +$lang->tree->product = "所属{$lang->productCommon}"; diff --git a/module/tree/model.php b/module/tree/model.php index 97271cd1da..e966cd3d2f 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -81,7 +81,7 @@ class treeModel extends model */ public function getOptionMenu($rootID, $type = 'story', $startModule = 0, $branch = 0) { - if($type == 'category') $rootID = 0; + if($type == 'line') $rootID = 0; $branches = array($branch => ''); if(strpos('story|bug|case', $type) !== false) @@ -170,6 +170,11 @@ class treeModel extends model return $modulePairs; } + public function getLinePairs() + { + return $this->dao->select('id, name')->from(TABLE_MODULE)->where('type')->eq('line')->fetchPairs(); + } + /** * Create an option menu of task in html. * @@ -314,7 +319,7 @@ class treeModel extends model */ public function getTreeMenu($rootID, $type = 'root', $startModule = 0, $userFunc, $extra = '', $branch = 0) { - if($type == 'category') $rootID = 0; + if($type == 'line') $rootID = 0; $branches = array($branch => ''); if($branch) @@ -763,7 +768,7 @@ class treeModel extends model } /** - * Create link of a product. + * Create link of a product line. * * @param string $type * @param object $module @@ -771,11 +776,11 @@ class treeModel extends model * @access public * @return string */ - public function createCategoryLink($type, $module, $extra) + public function createLineLink($type, $module, $extra) { $productID = $extra['productID']; $status = $extra['status']; - return html::a(helper::createLink('product', 'all', "productID={$productID}&category={$module->id}&status={$status}"), $module->name, '_self', "id='module{$module->id}'"); + return html::a(helper::createLink('product', 'all', "productID={$productID}&line={$module->id}&status={$status}"), $module->name, '_self', "id='module{$module->id}'"); } /** @@ -959,7 +964,7 @@ class treeModel extends model */ public function getSons($rootID, $moduleID, $type = 'root', $branch = 0) { - if($type == 'category') $rootID = 0; + if($type == 'line') $rootID = 0; /* if createVersion <= 4.1 or type == 'story', only get modules of its type. */ if(!$this->isMergeModule($rootID, $type) or $type == 'story') @@ -1205,7 +1210,7 @@ class treeModel extends model */ public function manageChild($rootID, $type, $parentModuleID, $childs) { - if($type == 'category') $rootID = 0; + if($type == 'line') $rootID = 0; $this->checkUnique($rootID, $type, $parentModuleID, $childs); $parentModule = $this->getByID($parentModuleID); @@ -1513,7 +1518,7 @@ class treeModel extends model */ public function getProductStructure($rootID, $viewType, $branch = 0, $currentModuleID = 0) { - if($viewType == 'category') $rootID = 0; + if($viewType == 'line') $rootID = 0; $branches = array($branch => ''); $product = $this->loadModel('product')->getById($rootID); diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 50ce4a4317..f0e795dfca 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -13,9 +13,9 @@ type) && $root->type != 'normal')) ? true : false;?> -tree->category : $lang->tree->name;?> +tree->line : $lang->tree->name;?>
-
tree->manageCategory : $lang->tree->common;?>
+
tree->manageLine : $lang->tree->common;?>
@@ -42,7 +42,7 @@
idAB);?> product->name);?>product->line);?> product->activeStories;?> product->changedStories;?> product->draftStories;?> createLink('product', 'view', 'product=' . $product->id), $product->name);?>line);?> stories['active']?> stories['changed']?> stories['draft']?>
product->category;?>tree->manageCategory);?>product->line;?>tree->manageLine);?>
product->PO;?>code, "class='form-control' autocomplete='off'");?>
product->category;?>category, "class='form-control chosen'");?>tree->manageCategory);?>product->line;?>line, "class='form-control chosen'");?>tree->manageLine);?>
product->PO;?>code;?>
product->category;?>category);?>product->line;?>line);?>
product->PO;?>
- + - + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> - - + + @@ -28,7 +28,7 @@ $webhook):?> - +
@@ -181,8 +181,8 @@ $(function() subModules: { linkTemplate: '', - title: 'tree->child ?>', - template: 'tree->child?>' + title: 'tree->child ?>', + template: 'tree->child?>' } }, action: function(event) @@ -246,7 +246,7 @@ $(function() $tree.find('[data-toggle="tooltip"]').tooltip(); $('#modulemenu > .nav > li > a[href*=tree][href*=browse]').not('[href*=]').parent().removeClass('active'); - if(viewType == 'category') $('#modulemenu > .nav > li > a[href*=product][href*=all]').parent('li[data-id=all]').addClass('active'); + if(viewType == 'line') $('#modulemenu > .nav > li > a[href*=product][href*=all]').parent('li[data-id=all]').addClass('active'); }); webhook->create->requiredFields = 'name, url'; $config->webhook->edit = new stdclass(); $config->webhook->edit->requiredFields = 'name, url'; -$config->webhook->contentTypes['json'] = 'application/json'; -$config->webhook->contentTypes['form'] = 'application/x-www-form-urlencoded'; - $config->webhook->objectTypes['product'] = array('opened', 'edited', 'closed', 'undeleted'); $config->webhook->objectTypes['story'] = array('opened', 'edited', 'commented', 'frombug', 'changed', 'reviewed', 'closed', 'activated'); $config->webhook->objectTypes['productplan'] = array('opened', 'edited'); diff --git a/module/webhook/control.php b/module/webhook/control.php index 537aff09c0..da9d02bc5c 100644 --- a/module/webhook/control.php +++ b/module/webhook/control.php @@ -151,9 +151,8 @@ class webhook extends control $webhook = zget($webhooks, $data->webhook, ''); if($webhook) { - $contentType = zget($this->config->webhook->contentTypes, $webhook->contentType, 'application/json'); - $result = $this->webhook->fetchHook($contentType, $webhook->url, $data->data); - $this->webhook->saveLog($data->webhook, $data->action, $webhook->url, $contentType, $data->data, $result); + $result = $this->webhook->fetchHook($webhook, $data->data); + $this->webhook->saveLog($webhook, $data->action, $data->data, $result); } $this->dao->update(TABLE_WEBHOOKDATAS)->set('status')->eq('sended')->where('id')->eq($data->id)->exec(); diff --git a/module/webhook/js/create.js b/module/webhook/js/create.js index 1842b61b8d..e4657394e3 100644 --- a/module/webhook/js/create.js +++ b/module/webhook/js/create.js @@ -3,7 +3,6 @@ $(function() $('#type').change(function() { var type = $(this).val(); - $('#contentTypeTR').toggle(type != 'dingding'); $('#sendTypeTR').toggle(type != 'dingding'); $('#paramsTR').toggle(type != 'bearychat' && type != 'dingding'); $('#urlNote').html(urlNote[type]); @@ -21,6 +20,18 @@ $(function() } }); + $('#allParams, #allActions').click(function() + { + if($(this).prop('checked')) + { + $(this).parents('tr').find('input[type=checkbox]').attr('checked', 'checked'); + } + else + { + $(this).parents('tr').find('input[type=checkbox]').removeAttr('checked'); + } + }); + $('#name').focus(); $('#paramstext').attr('disabled', 'disabled'); }); diff --git a/module/webhook/js/edit.js b/module/webhook/js/edit.js index 9fed36bc05..1609ce752a 100644 --- a/module/webhook/js/edit.js +++ b/module/webhook/js/edit.js @@ -12,6 +12,18 @@ $(function() } }); + $('#allParams, #allActions').click(function() + { + if($(this).prop('checked')) + { + $(this).parents('tr').find('input[type=checkbox]').attr('checked', 'checked'); + } + else + { + $(this).parents('tr').find('input[type=checkbox]').removeAttr('checked'); + } + }); + $('#name').focus(); $('#paramstext').attr('disabled', 'disabled'); }); diff --git a/module/webhook/lang/en.php b/module/webhook/lang/en.php new file mode 100644 index 0000000000..94ee063af6 --- /dev/null +++ b/module/webhook/lang/en.php @@ -0,0 +1,62 @@ +webhook->common = 'Webhook'; +$lang->webhook->list = 'Hook List'; +$lang->webhook->api = 'API'; +$lang->webhook->entry = 'Entry'; +$lang->webhook->log = 'Log'; +$lang->webhook->assigned = 'Assigned To'; + +$lang->webhook->browse = 'Browse'; +$lang->webhook->create = 'Create'; +$lang->webhook->edit = 'Edit'; +$lang->webhook->delete = 'Delete'; + +$lang->webhook->id = 'ID'; +$lang->webhook->type = 'Type'; +$lang->webhook->name = 'Name'; +$lang->webhook->url = 'Webhook Address'; +$lang->webhook->contentType = 'Content Type'; +$lang->webhook->sendType = 'Send Type'; +$lang->webhook->product = 'Product'; +$lang->webhook->project = 'Project'; +$lang->webhook->params = 'Params'; +$lang->webhook->action = 'Action'; +$lang->webhook->desc = 'Desc'; +$lang->webhook->createdBy = 'Created By'; +$lang->webhook->createdDate = 'Created Date'; +$lang->webhook->editedby = 'Edited By'; +$lang->webhook->editedDate = 'Edited Date'; +$lang->webhook->date = 'Date'; +$lang->webhook->data = 'Data'; +$lang->webhook->result = 'Result'; + +$lang->webhook->typeList['bearychat'] = 'Bearychat'; +$lang->webhook->typeList['dingding'] = 'Dingding'; +$lang->webhook->typeList['default'] = 'Default'; + +$lang->webhook->sendTypeList['sync'] = 'Synchronization'; +$lang->webhook->sendTypeList['async'] = 'Asynchronous'; + +$lang->webhook->paramsList['objectType'] = 'Object Type'; +$lang->webhook->paramsList['objectID'] = 'Object ID'; +$lang->webhook->paramsList['product'] = 'Product'; +$lang->webhook->paramsList['project'] = 'Project'; +$lang->webhook->paramsList['action'] = 'Action'; +$lang->webhook->paramsList['actor'] = 'Actor'; +$lang->webhook->paramsList['date'] = 'Date'; +$lang->webhook->paramsList['comment'] = 'Comment'; +$lang->webhook->paramsList['text'] = 'Action Desc'; + +$lang->webhook->saveSuccess = 'Save success.'; +$lang->webhook->confirmDelete = 'Are your sure delete this hook?'; + +$lang->webhook->trimWords = ''; + +$lang->webhook->note = new stdClass(); +$lang->webhook->note->async = 'If the send type is asynchronous, need open cron.'; +$lang->webhook->note->product = 'All actions will trigger the hook if the product is empty, else only actions of the product will trigger it.'; +$lang->webhook->note->project = 'All actions will trigger the hook if the project is empty, else only actions of the project will trigger it.'; + +$lang->webhook->note->typeList['bearychat'] = 'Add a zentao bot in bearychat and get the webhook address.'; +$lang->webhook->note->typeList['dingding'] = 'Add a customed bot in dingding and get the webhook address.'; +$lang->webhook->note->typeList['default'] = 'Get webhook address from others'; diff --git a/module/webhook/lang/zh-cn.php b/module/webhook/lang/zh-cn.php index f7d2be68b9..7d981f8173 100644 --- a/module/webhook/lang/zh-cn.php +++ b/module/webhook/lang/zh-cn.php @@ -17,9 +17,9 @@ $lang->webhook->name = '名称'; $lang->webhook->url = 'Hook地址'; $lang->webhook->contentType = '内容类型'; $lang->webhook->sendType = '发送方式'; -$lang->webhook->params = '参数'; $lang->webhook->product = '关联产品'; $lang->webhook->project = '关联项目'; +$lang->webhook->params = '参数'; $lang->webhook->action = '触发动作'; $lang->webhook->desc = '描述'; $lang->webhook->createdBy = '由谁创建'; diff --git a/module/webhook/model.php b/module/webhook/model.php index 7b99c75124..7dbf71a7d8 100644 --- a/module/webhook/model.php +++ b/module/webhook/model.php @@ -79,11 +79,9 @@ class webhookModel extends model $action = $actions[$log->action]; - $text = $this->app->user->realname . $this->lang->action->label->{$action->action}. $this->lang->action->objectTypes[$action->objectType]; $object = $this->dao->select('*')->from($this->config->objectTables[$action->objectType])->where('id')->eq($action->objectID)->fetch(); $field = $this->config->action->objectNameFields[$action->objectType]; - $text .= "[#{$action->objectID}::{$object->$field}]"; - if($action->action == 'assigned') $text .= ' ' . $this->lang->webhook->assigned . ' ' . zget($users, $object->assignedTo); + $text = $this->app->user->realname . $this->lang->action->label->{$action->action}. $this->lang->action->objectTypes[$action->objectType] . "[#{$action->objectID}::{$object->$field}]"; $log->action = $text; $log->actionURL = $this->getViewLink($action->objectType, $action->objectID); @@ -151,6 +149,7 @@ class webhookModel extends model ->join('products', ',') ->join('projects', ',') ->skipSpecial('url') + ->remove('allParams, allActions') ->get(); $webhook->params = $this->post->params ? implode(',', $this->post->params) . ',text' : 'text'; $webhook->actions = $this->post->actions ? json_encode($this->post->actions) : '[]'; @@ -177,6 +176,7 @@ class webhookModel extends model ->join('products', ',') ->join('projects', ',') ->skipSpecial('url') + ->remove('allParams, allActions') ->get(); $webhook->params = $this->post->params ? implode(',', $this->post->params) . ',text' : 'text'; $webhook->actions = $this->post->actions ? json_encode($this->post->actions) : '[]'; @@ -217,9 +217,8 @@ class webhookModel extends model continue; } - $contentType = zget($this->config->webhook->contentTypes, $webhook->contentType, 'application/json'); - $result = $this->fetchHook($contentType, $webhook->url, $postData); - $this->saveLog($id, $actionID, $webhook->url, $contentType, $postData, $result); + $result = $this->fetchHook($webhook, $postData); + $this->saveLog($webhook, $actionID, $postData, $result); } return !dao::isError(); } @@ -268,18 +267,15 @@ class webhookModel extends model $email = ''; if($actionType == 'assigned') { - $assignedTo = $object->assignedTo; foreach($users as $user) { if($user->account == $object->assignedTo) { - $assignedTo = $user->realname; - $mobile = $user->mobile; - $email = $user->email; + $mobile = $user->mobile; + $email = $user->email; break; } } - $text .= ' ' . $this->lang->webhook->assigned . ' ' . $assignedTo; } $action->text = $text; @@ -396,18 +392,17 @@ class webhookModel extends model /** * Post hook data. * - * @param string $contentType - * @param string $url + * @param object $webhook * @param string $sendData * @access public * @return int */ - public function fetchHook($contentType, $url, $sendData) + public function fetchHook($webhook, $sendData) { - $header[] = "Content-Type: $contentType;charset=utf-8"; + $header[] = "Content-Type: {$webhook->contentType};charset=utf-8"; $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_URL, $webhook->url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_POSTFIELDS, $sendData); @@ -451,22 +446,21 @@ class webhookModel extends model * * @param int $webhookID * @param int $actionID - * @param string $url - * @param string $contentType + * @param object $webhook * @param string $data * @param string $result * @access public * @return bool */ - public function saveLog($webhookID, $actionID, $url, $contentType, $data, $result) + public function saveLog($webhook, $actionID, $data, $result) { $log = new stdclass(); $log->objectType = 'webhook'; - $log->objectID = $webhookID; + $log->objectID = $webhook->id; $log->action = $actionID; $log->date = helper::now(); - $log->url = $url; - $log->contentType = $contentType; + $log->url = $webhook->url; + $log->contentType = $webhook->contentType; $log->data = $data; $log->result = $result; diff --git a/module/webhook/view/browse.html.php b/module/webhook/view/browse.html.php index e92b037378..44b04b7d7c 100644 --- a/module/webhook/view/browse.html.php +++ b/module/webhook/view/browse.html.php @@ -18,8 +18,8 @@
webhook->id);?>webhook->type);?>webhook->name);?>webhook->type);?>webhook->name);?> webhook->url);?> actions;?>
webhook->typeList, $webhook->type);?>webhook->typeList, $webhook->type);?> name;?> url;?> diff --git a/module/webhook/view/create.html.php b/module/webhook/view/create.html.php index 26ac4170bd..7d64b7a88d 100644 --- a/module/webhook/view/create.html.php +++ b/module/webhook/view/create.html.php @@ -23,7 +23,7 @@ - + @@ -37,11 +37,6 @@ - - - - - @@ -58,11 +53,19 @@ - + - +
webhook->type;?>webhook->type;?> webhook->typeList, 'default', "class='form-control'");?>
webhook->note->typeList['default'];?>
webhook->contentType;?>webhook->contentTypes, '', "class='form-control'");?>
webhook->sendType;?> webhook->sendTypeList, '', "class='form-control'");?>webhook->note->project;?>
webhook->params;?> + + webhook->paramsList, 'text');?>
webhook->action;?> + + webhook->objectTypes as $objectType => $actions):?> diff --git a/module/webhook/view/edit.html.php b/module/webhook/view/edit.html.php index f0ec311465..9f1b29043d 100644 --- a/module/webhook/view/edit.html.php +++ b/module/webhook/view/edit.html.php @@ -22,7 +22,7 @@
- + @@ -32,11 +32,6 @@ type != 'dingding'):?> - - - - - @@ -55,12 +50,20 @@ type,") === false):?> - + - +
webhook->name;?>webhook->name;?> name, "class='form-control'");?>
webhook->note->typeList, $webhook->type);?>
webhook->contentType;?>webhook->contentTypes, $webhook->contentType, "class='form-control'");?>
webhook->sendType;?> webhook->sendTypeList, $webhook->sendType, "class='form-control'");?>
webhook->params;?> + + webhook->paramsList, $webhook->params);?>
webhook->action;?> + + webhook->objectTypes as $objectType => $actions):?> diff --git a/module/webhook/view/header.html.php b/module/webhook/view/header.html.php index d4a60744ea..3296e5720b 100644 --- a/module/webhook/view/header.html.php +++ b/module/webhook/view/header.html.php @@ -14,7 +14,7 @@
From 5a5a10256d2e7f36facfc0f6e79805f5ed7645c0 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 2 Nov 2017 14:06:06 +0800 Subject: [PATCH 03/14] * Fix bug #1261. --- module/task/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/task/model.php b/module/task/model.php index cd678b877d..c4ada3a1d1 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -150,6 +150,8 @@ class taskModel extends model foreach($tasks->story as $key => $storyID) { if(empty($tasks->name[$key])) continue; + if($tasks->type[$key] == 'affair') continue; + if($tasks->type[$key] == 'ditto' && isset($tasks->type[$key - 1]) && $tasks->type[$key - 1] == 'affair') continue; $inNames = in_array($tasks->name[$key], $taskNames); if(!$inNames || $inNames && !in_array($storyID, $storyIDs)) From 99bd7ed90961e1cb5ced3873360308e4159cdbec Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 14:28:02 +0800 Subject: [PATCH 04/14] * finish task #3289. --- module/project/control.php | 16 +++++----------- module/project/js/story.js | 9 ++++++++- module/project/model.php | 1 + module/project/view/story.html.php | 12 ++++++------ module/story/model.php | 5 +++-- module/tutorial/model.php | 18 ++++++++++-------- 6 files changed, 33 insertions(+), 28 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 18d557a42c..3fa6459aa6 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -530,7 +530,7 @@ class project extends control * @access public * @return void */ - public function story($projectID = 0, $orderBy = 'order', $type = 'byModule', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) + public function story($projectID = 0, $orderBy = 'order_desc', $type = 'byModule', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) { /* Load these models. */ $this->loadModel('story'); @@ -2010,17 +2010,11 @@ class project extends control $idList = explode(',', trim($this->post->storys, ',')); $orderBy = $this->post->orderBy; - $stories = $this->dao->select('story,`order`')->from(TABLE_PROJECTSTORY)->alias('t1') - ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id') - ->where('t1.story')->in($idList) - ->andWhere('t1.project')->eq($projectID) - ->orderBy($orderBy) - ->fetchPairs('order', 'story'); - foreach($stories as $order => $id) + $order = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('story')->in($idList)->andWhere('project')->eq($projectID)->orderBy('order_asc')->fetch('order'); + foreach($idList as $storyID) { - $newID = array_shift($idList); - if($id == $newID) continue; - $this->dao->update(TABLE_PROJECTSTORY)->set('`order`')->eq($order)->where('story')->eq($newID)->andWhere('project')->eq($projectID)->exec(); + $this->dao->update(TABLE_PROJECTSTORY)->set('`order`')->eq($order)->where('story')->eq($storyID)->andWhere('project')->eq($projectID)->exec(); + $order++; } } diff --git a/module/project/js/story.js b/module/project/js/story.js index 08d74073cb..d28778aae3 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -6,7 +6,14 @@ $(function() { var list = ''; for(i = 0; i < data.list.length; i++) list += $(data.list[i]).attr('data-id') + ','; - $.post(createLink('project', 'storySort', 'projectID=' + projectID), {'storys' : list, 'orderBy' : orderBy}); + $.post(createLink('project', 'storySort', 'projectID=' + projectID), {'storys' : list, 'orderBy' : orderBy}, function() + { + var $target = $(data.element[0]); + $target.hide(); + $target.fadeIn(1000); + order = 'order_asc' + history.pushState({}, 0, createLink('project', 'story', "projectID=" + projectID + '&orderBy=' + order)); + }); }); fixedTfootAction('#projectStoryForm'); diff --git a/module/project/model.php b/module/project/model.php index 23bdf207fa..c4fdf44a39 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2314,6 +2314,7 @@ class projectModel extends model ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->where('t1.project')->eq((int)$projectID) ->andWhere('t2.deleted')->eq(0) + ->orderBy('t1.`order`_desc') ->fetchAll(); $storyGroups = array(); foreach($stories as $story) $storyGroups[$story->product][$story->module][$story->id] = $story; diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index b416ef606e..8cc879670d 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -64,6 +64,9 @@
id}&orderBy=%s&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + @@ -75,9 +78,6 @@ - - - @@ -98,6 +98,9 @@ id));?> + + + - - - diff --git a/module/story/model.php b/module/story/model.php index d3c73d8229..d3b1d312bf 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -40,7 +40,7 @@ class storyModel extends model $story->projects = $this->dao->select('t1.project, t2.name, t2.status')->from(TABLE_PROJECTSTORY)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t1.story')->eq($storyID) - ->orderBy('t1.project DESC') + ->orderBy('t1.`order` DESC') ->fetchAll('project'); $story->tasks = $this->dao->select('id, name, assignedTo, project, status, consumed, `left`')->from(TABLE_TASK)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->orderBy('id DESC')->fetchGroup('project'); $story->stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->eq($storyID)->fetchPairs('branch', 'stage'); @@ -1574,7 +1574,7 @@ class storyModel extends model * @access public * @return array */ - public function getProjectStories($projectID = 0, $orderBy = 'pri_asc,id_desc', $type = 'byModule', $param = 0, $pager = null) + public function getProjectStories($projectID = 0, $orderBy = 't1.`order`_desc', $type = 'byModule', $param = 0, $pager = null) { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectStories(); @@ -1667,6 +1667,7 @@ class storyModel extends model ->beginIF($productID)->andWhere('t2.product')->eq((int)$productID)->fi() ->beginIF($branch)->andWhere('t2.branch')->in("0,$branch")->fi() ->beginIF($moduleIdList)->andWhere('t2.module')->in($moduleIdList)->fi() + ->orderBy('t1.`order` desc') ->fetchAll(); if(!$stories) return array(); return $this->formatStories($stories, $type); diff --git a/module/tutorial/model.php b/module/tutorial/model.php index b5930811cb..dcdafdfbb9 100644 --- a/module/tutorial/model.php +++ b/module/tutorial/model.php @@ -110,6 +110,7 @@ class tutorialModel extends model $story->duplicateStory = 0; $story->version = 1; $story->deleted = '0'; + $story->order = '0'; $stories = array(); $stories[] = $story; @@ -202,14 +203,15 @@ class tutorialModel extends model public function getTeamMembers() { $member = new stdclass(); - $member->project = 1; - $member->account = $this->app->user->account; - $member->role = $this->app->user->role; - $member->join = $this->app->user->join; - $member->days = 10; - $member->hours = 7.0; - $member->totalHours = 70.0; - $member->realname = $this->app->user->realname; + $member->project = 1; + $member->account = $this->app->user->account; + $member->role = $this->app->user->role; + $member->join = $this->app->user->join; + $member->days = 10; + $member->hours = 7.0; + $member->totalHours = 70.0; + $member->realname = $this->app->user->realname; + $member->limitedUser = 0; return array($member->account => $member); } From 80b14f7c0459ca424ed2c07150bbac630e1934a8 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 15:20:29 +0800 Subject: [PATCH 05/14] =?UTF-8?q?Finish=20task#3287=20=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=8C=89=E9=92=AE=E5=90=88=E5=B9=B6=E5=88=B0?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=8E=92=E5=BA=8F=E8=8F=9C=E5=8D=95=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=9C=80=E6=B1=82ID=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8E=92=E5=BA=8F,cost:1=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/project/control.php | 2 +- module/project/css/kanban.css | 3 +++ module/project/lang/en.php | 4 ++-- module/project/lang/zh-cn.php | 4 ++-- module/project/view/kanban.html.php | 21 +++++++++++++-------- module/upgrade/model.php | 5 ++++- 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 3fa6459aa6..bbcaacc0d5 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1254,7 +1254,7 @@ class project extends control * @access public * @return void */ - public function kanban($projectID, $type = 'story', $orderBy = 'pri_asc') + public function kanban($projectID, $type = 'story', $orderBy = 'order_asc') { /* Save to session. */ $uri = $this->app->getURI(true); diff --git a/module/project/css/kanban.css b/module/project/css/kanban.css index 5511a1dddc..453f4a8cfb 100644 --- a/module/project/css/kanban.css +++ b/module/project/css/kanban.css @@ -86,6 +86,9 @@ table th.col-closed {width:14%} .board-story.stage-tested.inverse {background-color:#827717;} .board-story.stage-released.inverse {background-color:#9C27B0;} +.board-assignedTo {color:#D2322D; background-color: #FFEBEE;} +.board-finishedBy {color:#229F24; background-color: #E8F5E9;} + .bug-pri,.task-pri {display: inline-block; width: 16px; height: 16px; text-align: center; border-radius: 8px; border: 1px solid #ddd; font-size: 12px; line-height: 14px;} .affix {position:fixed; top:0px; width:95%;z-index:1030;} diff --git a/module/project/lang/en.php b/module/project/lang/en.php index a51c8c57c9..f963818496 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -238,10 +238,10 @@ $lang->project->placeholder->totalLeft = 'Total man-hour remained when start Pro $lang->project->selectGroup = new stdclass(); $lang->project->selectGroup->done = '(Done)'; +$lang->project->orderList['order_asc'] = "Order Asc"; +$lang->project->orderList['order_desc'] = "Order Desc"; $lang->project->orderList['pri_asc'] = "Priority Asc"; $lang->project->orderList['pri_desc'] = "Priority Desc"; -$lang->project->orderList['id_asc'] = "ID Asc"; -$lang->project->orderList['id_desc'] = "ID Desc"; $lang->project->orderList['stage_asc'] = "Stage Asc"; $lang->project->orderList['stage_desc'] = "Stage Desc"; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 75dfc0e5aa..becffa1fd1 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -238,10 +238,10 @@ $lang->project->placeholder->totalLeft = '项目开始时的总预计工时'; $lang->project->selectGroup = new stdclass(); $lang->project->selectGroup->done = '(已结束)'; +$lang->project->orderList['order_asc'] = "需求排序正序"; +$lang->project->orderList['order_desc'] = "需求排序倒序"; $lang->project->orderList['pri_asc'] = "需求优先级正序"; $lang->project->orderList['pri_desc'] = "需求优先级倒序"; -$lang->project->orderList['id_asc'] = "需求ID正序"; -$lang->project->orderList['id_desc'] = "需求ID倒序"; $lang->project->orderList['stage_asc'] = "需求阶段正序"; $lang->project->orderList['stage_desc'] = "需求阶段倒序"; diff --git a/module/project/view/kanban.html.php b/module/project/view/kanban.html.php index e92107ee8c..b7a6ed1b25 100644 --- a/module/project/view/kanban.html.php +++ b/module/project/view/kanban.html.php @@ -27,18 +27,23 @@ $account = $this->app->user->account 0) or $type != 'story');?> diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 29a25377b5..1c5d1a4828 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -1802,7 +1802,10 @@ class upgradeModel extends model */ public function initProjectStoryOrder() { - $storyGroup = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->orderBy('story_asc')->fetchGroup('project', 'story'); + $storyGroup = $this->dao->select('t1.*')->from(TABLE_PROJECTSTORY)->alias('t1') + ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id') + ->orderBy('t2.pri_desc,t1.story_asc') + ->fetchGroup('project', 'story'); foreach($storyGroup as $projectID => $stories) { From a5a18ad2e4d78fd5beb1ca3fcc5e301b999753b2 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 15:25:55 +0800 Subject: [PATCH 06/14] =?UTF-8?q?Finish=20task#3315=20=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E7=9B=B8=E5=85=B3=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8E=BB=E6=8E=89,cost:0.1=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/task/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/config.php b/module/task/config.php index 200c71b7e2..ee0236e1f1 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -58,7 +58,7 @@ if($config->global->flow == 'onlyTask') } $config->task->datatable = new stdclass(); -$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'story', 'actions'); +$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'actions'); $config->task->datatable->fieldList['id']['title'] = 'idAB'; $config->task->datatable->fieldList['id']['fixed'] = 'left'; From cddabe418855202b44b6fcde7cc3fa22fa0343fc Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 15:50:52 +0800 Subject: [PATCH 07/14] =?UTF-8?q?Finish=20task#3300=20=E5=B7=B2=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E7=9A=84=E9=A1=B9=E7=9B=AE=E9=9C=80=E6=B1=82=E6=89=80?= =?UTF-8?q?=E5=A4=84=E9=98=B6=E6=AE=B5=E5=8F=AA=E8=83=BD=E6=94=B9=E5=88=B0?= =?UTF-8?q?=E5=8F=91=E5=B8=83,cost:0.2=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/project/view/edit.html.php | 2 +- module/story/model.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index d9f2b4f990..85f467c348 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -117,7 +117,7 @@
id, "class='form-control chosen' onchange='loadBranches(this)'");?> - type != 'normal') echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control' style='width:80px'")?> + type != 'normal' and isset($branchGroups[$product->id])) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control' style='width:80px'")?>
diff --git a/module/story/model.php b/module/story/model.php index d3b1d312bf..7f3764f9ef 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -976,6 +976,9 @@ class storyModel extends model $story->lastEditedDate = $now; $story->stage = $stage; + /* When stage is verified then only change to released. */ + if($oldStory->stage == 'verified' and $stage->stage != 'released') $stage->stage = 'verified'; + $this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec(); if(!dao::isError()) $allChanges[$storyID] = common::createChanges($oldStory, $story); } From 19114bbf63ace22f726e194272dc5576ed88ad5e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:07:08 +0800 Subject: [PATCH 08/14] * fix bug #3296. --- module/project/config.php | 2 +- module/project/lang/en.php | 2 +- module/project/lang/zh-cn.php | 2 +- module/project/lang/zh-tw.php | 2 +- module/project/view/all.html.php | 2 +- module/project/view/taskdata.html.php | 211 -------------------------- 6 files changed, 5 insertions(+), 216 deletions(-) delete mode 100644 module/project/view/taskdata.html.php diff --git a/module/project/config.php b/module/project/config.php index 27288cdde1..0bda9aa952 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -6,7 +6,7 @@ $config->project->maxBurnDay = '31'; $config->project->weekend = '2'; $config->project->list = new stdclass(); -$config->project->list->exportFields = 'id,name,code,PM,end,status,totalEstimate,totalConsumed,totalLeft,progess'; +$config->project->list->exportFields = 'id,name,code,PM,end,status,totalEstimate,totalConsumed,totalLeft,progress'; global $lang, $app; $app->loadLang('task'); diff --git a/module/project/lang/en.php b/module/project/lang/en.php index f963818496..fa3ed277d0 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -38,7 +38,7 @@ $lang->project->totalEstimate = 'Est.'; $lang->project->totalConsumed = 'Consumed'; $lang->project->totalLeft = 'Total Remained'; $lang->project->Left = 'Remained'; -$lang->project->progess = 'Progess'; +$lang->project->progress = 'Progress'; $lang->project->hours = 'Estimate %s, Consumed %s, Remained %s'; $lang->project->viewBug = 'Bugs'; $lang->project->noProduct = "No {$lang->productCommon}"; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index becffa1fd1..6aefabc777 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -38,7 +38,7 @@ $lang->project->totalEstimate = '总预计'; $lang->project->totalConsumed = '总消耗'; $lang->project->totalLeft = '总剩余'; $lang->project->Left = '剩余'; -$lang->project->progess = '进度'; +$lang->project->progress = '进度'; $lang->project->hours = '预计 %s 消耗 %s 剩余 %s'; $lang->project->viewBug = '查看bug'; $lang->project->noProduct = "无{$lang->productCommon}{$lang->projectCommon}"; diff --git a/module/project/lang/zh-tw.php b/module/project/lang/zh-tw.php index cd6b3baf38..88aa5254df 100644 --- a/module/project/lang/zh-tw.php +++ b/module/project/lang/zh-tw.php @@ -38,7 +38,7 @@ $lang->project->totalEstimate = '總預計'; $lang->project->totalConsumed = '總消耗'; $lang->project->totalLeft = '總剩餘'; $lang->project->Left = '剩餘'; -$lang->project->progess = '進度'; +$lang->project->progress = '進度'; $lang->project->hours = '預計 %s 消耗 %s 剩餘 %s'; $lang->project->viewBug = '查看bug'; $lang->project->noProduct = "無{$lang->productCommon}{$lang->projectCommon}"; diff --git a/module/project/view/all.html.php b/module/project/view/all.html.php index 45d11f03b9..1990468546 100644 --- a/module/project/view/all.html.php +++ b/module/project/view/all.html.php @@ -42,7 +42,7 @@
- + diff --git a/module/project/view/taskdata.html.php b/module/project/view/taskdata.html.php deleted file mode 100644 index 1401800464..0000000000 --- a/module/project/view/taskdata.html.php +++ /dev/null @@ -1,211 +0,0 @@ - - * @package project - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
idAB);?> project->updateOrder);?> priAB);?> story->title);?> openedByAB);?>story->bugCountAB;?> story->caseCountAB;?> actions;?> project->updateOrder);?>
story->priList, $story->pri, $story->pri)?>'>story->priList, $story->pri, $story->pri);?> product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?> @@ -154,9 +157,6 @@ } ?>
- - - task->$type;?> - project->totalEstimate;?> project->totalConsumed;?> project->totalLeft;?>project->progess;?>project->progress;?> project->burn;?> project->updateOrder);?>
- - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - - - type == 'sprint'): ?> - - - - - - - - - - - assignedTo == $app->user->account ? 'style=color:red' : ''; ?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - type == 'sprint') - { - echo ''; - } - ?> - - - children):?> - children as $child):?> - assignedTo == $app->user->account ? 'style=color:red' : ''; ?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - type == 'sprint') - { - echo ''; - } - ?> - - - - - - - From 500139efde90c633c62141b5fc101281b0373f13 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:11:59 +0800 Subject: [PATCH 09/14] * fix error for projectblock. --- module/block/view/projectblock.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index 66bddacff9..e6858c71e0 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -23,7 +23,7 @@ - + From 04cab43447f17721fd8d9683180990d83fb9072b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:14:36 +0800 Subject: [PATCH 10/14] =?UTF-8?q?Finish=20task#3304=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E4=B8=89=E8=A7=92=E5=9B=BE=E6=A0=87=E6=94=B9?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E4=BD=BF=E7=94=A8info=E5=9B=BE=E6=A0=87,cost?= =?UTF-8?q?:0.2=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/testreport/lang/en.php | 6 +++--- module/testreport/lang/zh-cn.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/testreport/lang/en.php b/module/testreport/lang/en.php index e8d745527e..9f5a688bac 100644 --- a/module/testreport/lang/en.php +++ b/module/testreport/lang/en.php @@ -64,8 +64,8 @@ $lang->testreport->fromCaseBugTip= "Bug created after failure of use case in tes $lang->testreport->errorTrunk = "The trunk version cannot create a test report. Please modify the associated version!"; $lang->testreport->bugSummary = <<%s Bug(s) generated in total , -%s Bug(s) remained unresolve , -%s Bug(s) failure of case . +%s Bug(s) generated in total , +%s Bug(s) remained unresolve , +%s Bug(s) failure of case testreport->fromCaseBugTip= "测试时间范围内,用例执行失败 $lang->testreport->errorTrunk = "主干版本不能创建测试报告,请修改关联版本!"; $lang->testreport->bugSummary = <<%s个Bug , -遗留%s个Bug 。 -用例执行产生%s个Bug 。 +共发现%s个Bug , +遗留%s个Bug 。 +用例执行产生%s个Bug 。 有效Bug率(方案为已解决或延期 / 状态为已解决或已关闭):%s,用例发现Bug率(用例创建的Bug / 发现Bug数):%s EOD; From 0f377e47505de0402d6c511717d40540d018432d Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 2 Nov 2017 16:29:48 +0800 Subject: [PATCH 11/14] * Add line when export products. --- module/product/config.php | 2 +- module/product/control.php | 2 ++ module/product/view/all.html.php | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/module/product/config.php b/module/product/config.php index b47f613d0c..9ca748dac5 100644 --- a/module/product/config.php +++ b/module/product/config.php @@ -8,7 +8,7 @@ $config->product->custom = new stdclass(); $config->product->custom->batchEditFields = 'PO,QD,RD,status'; $config->product->list = new stdclass(); -$config->product->list->exportFields = 'id,name,activeStories,changedStories,draftStories,closedStories,plans,releases,bugs,unResolvedBugs,assignToNullBugs'; +$config->product->list->exportFields = 'id,name,line,activeStories,changedStories,draftStories,closedStories,plans,releases,bugs,unResolvedBugs,assignToNullBugs'; global $lang, $app; $app->loadLang('story'); diff --git a/module/product/control.php b/module/product/control.php index cd6b39f21a..2e4dec0693 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -707,9 +707,11 @@ class product extends control unset($fields[$key]); } + $lines = $this->loadModel('tree')->getLinePairs(); $productStats = $this->product->getStats($orderBy, null, $status); foreach($productStats as $i => $product) { + $product->line = zget($lines, $product->line, ''); $product->activeStories = (int)$product->stories['active']; $product->changedStories = (int)$product->stories['changed']; $product->draftStories = (int)$product->stories['draft']; diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 59a7ea0959..363f47aa35 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -58,7 +58,7 @@ ' id='productsForm'>
idAB);?> priAB);?> task->name);?> statusAB);?> task->deadlineAB);?> task->openedDateAB);?> task->assignedToAB);?> task->finishedByAB);?> task->finishedDateAB);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?>task->progess;?>task->story); ?>actions;?>
- - id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?> - task->priList, $task->pri, $task->pri)?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?> - product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . '';?> - module) echo "" . $modulePairs[$task->module] . '';?> - id", $task->name, null, "style='color: $task->color'")) echo $task->name; - if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'"); - ?> - - storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion); - if($storyChanged) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->task->statusList[$task->status]; - } - ?> - deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?>openedDate, 5, 6);?>>assignedTo == 'closed' ? 'Closed' : zget($users, $task->assignedTo, $task->assignedTo);?>finishedBy, $task->finishedBy);?>finishedDate, 5, 6);?>estimate;?>consumed;?>left;?>progess?>%'; - if($task->storyID) - { - if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle; - } - echo ' - project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true); - if($browseType == 'needconfirm') - { - $lang->task->confirmStoryChange = $lang->confirm; - common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin'); - } - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list'); - common::printIcon('task', 'batchCreate', "project=$projectID&storyID=&moduleID=$moduleID&taskID=$task->id", $task, 'list','plus','','','','',$lang->task->children); - ?> -
- - id", sprintf('%03d', $child->id))) printf('%03d', $child->id);?> - task->priList, $child->pri, $child->pri)?>'>pri == '0' ? '' : zget($lang->task->priList, $child->pri, $child->pri);?> - product][$child->branch])) echo "" . $branchGroups[$child->product][$child->branch] . '';?> - module) echo "" . $modulePairs[$child->module] . '';?> - id", $child->name, null, "style='color: $child->color'")) echo $child->name; - if($child->fromBug) echo html::a($this->createLink('bug', 'view', "id=$child->fromBug"), "[BUG#$child->fromBug]", '_blank', "class='bug'"); - ?> - - storyStatus == 'active' and $child->latestStoryVersion > $child->storyVersion); - if($storyChanged) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$child->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->task->statusList[$child->status]; - } - ?> - deadline, 0, 4) > 0) echo substr($child->deadline, 5, 6);?>openedDate, 5, 6);?>>assignedTo == 'closed' ? 'Closed' : zget($users, $child->assignedTo, $child->assignedTo);?>finishedBy, $child->finishedBy);?>finishedDate, 5, 6);?>estimate;?>consumed;?>left;?>progess?>%'; - if($child->storyID) - { - if(!common::printLink('story', 'view', "storyid=$child->storyID", $child->storyTitle)) print $child->storyTitle; - } - echo ' - project&taskID=$child->id", $child, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); - - common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe', true); - if($browseType == 'needconfirm') - { - $lang->task->confirmStoryChange = $lang->confirm; - common::printIcon('task', 'confirmStoryChange', "taskid=$child->id", '', 'list', '', 'hiddenwin'); - } - common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list'); - common::printIcon('task', 'batchCreate', "", $child, 'list','plus','','','','',$lang->task->children); - ?> -
project->totalEstimate;?> project->totalConsumed;?> project->totalLeft;?>project->progess;?>project->progress;?> project->burn;?>
- recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> @@ -107,7 +107,7 @@ -
idAB);?>
+
From e6b8226f535cd0e06d80c2683ed2366460eb5606 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:55:50 +0800 Subject: [PATCH 12/14] * finish task #3295. --- module/project/view/activate.html.php | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/module/project/view/activate.html.php b/module/project/view/activate.html.php index c45035806f..fb10dc0bcc 100644 --- a/module/project/view/activate.html.php +++ b/module/project/view/activate.html.php @@ -26,22 +26,22 @@ - + + - - - - @@ -61,7 +61,9 @@ $(function() { $('#readjustTime').change(function() { + $('#sourceTimeBox').toggle(!$(this).prop('checked')) $('#readjustTimeBox').toggle($(this).prop('checked')) + $('#readjustTaskBox').toggle($(this).prop('checked')) }) }) From 1485cad7514f2a577d43f3ea73e8e28a1599e7a0 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 2 Nov 2017 17:27:05 +0800 Subject: [PATCH 13/14] * Don't display parent when edit a product line. * Don't display child page when browse a product line. --- module/tree/view/browse.html.php | 2 +- module/tree/view/edit.html.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index f0e795dfca..79fdfd7137 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -151,7 +151,7 @@ $(function() }, itemCreator: function($li, item) { - var link = item.id !== undefined ? ('' + item.name + '') : ('' + item.name + ''); + var link = (item.id !== undefined && item.type != 'line') ? ('' + item.name + '') : ('' + item.name + ''); var $toggle = $('' + link + ''); if(item.type === 'bug') $toggle.append('  [B]'); if(item.type === 'case') $toggle.append('  [C]'); diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index dfa73873e1..38f55eb5fd 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -30,10 +30,12 @@ $jsRoot = $webRoot . "js/"; type == 'story');?> + type != 'line'):?> > + > From c5c3f585c48a461c69f9cac82ef9d7ea04fbef2d Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 2 Nov 2017 17:38:11 +0800 Subject: [PATCH 14/14] * Finish task #3303. --- module/action/lang/zh-cn.php | 6 +++--- module/common/lang/zh-cn.php | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 86a3f4edcf..b03587b84c 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -63,7 +63,7 @@ $lang->action->objectTypes['bug'] = 'Bug'; $lang->action->objectTypes['case'] = '用例'; $lang->action->objectTypes['caseresult'] = '用例结果'; $lang->action->objectTypes['stepresult'] = '用例步骤'; -$lang->action->objectTypes['testtask'] = '测试版本'; +$lang->action->objectTypes['testtask'] = '测试单'; $lang->action->objectTypes['user'] = '用户'; $lang->action->objectTypes['doc'] = '文档'; $lang->action->objectTypes['doclib'] = '文档库'; @@ -193,7 +193,7 @@ $lang->action->label->task = '任务|task|view|taskID=%s'; $lang->action->label->build = 'Build|build|view|buildID=%s'; $lang->action->label->bug = 'Bug|bug|view|bugID=%s'; $lang->action->label->case = '用例|testcase|view|caseID=%s'; -$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s'; +$lang->action->label->testtask = '测试单|testtask|view|caseID=%s'; $lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s'; $lang->action->label->caselib = '测试库|testsuite|libview|libID=%s'; $lang->action->label->todo = 'todo|todo|view|todoID=%s'; @@ -215,7 +215,7 @@ $lang->action->search->objectTypeList['caseresult'] = '用例结果'; $lang->action->search->objectTypeList['stepresult'] = '用例步骤'; $lang->action->search->objectTypeList['story'] = '需求'; $lang->action->search->objectTypeList['task'] = '任务'; -$lang->action->search->objectTypeList['testtask'] = '测试任务'; +$lang->action->search->objectTypeList['testtask'] = '测试单'; $lang->action->search->objectTypeList['user'] = '用户'; $lang->action->search->objectTypeList['doc'] = '文档'; $lang->action->search->objectTypeList['doclib'] = '文档库'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index fcadd102fb..0ad5af85b3 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -122,7 +122,7 @@ $lang->searchObjects['user'] = '用户'; $lang->searchObjects['build'] = '版本'; $lang->searchObjects['release'] = '发布'; $lang->searchObjects['productplan'] = $lang->productCommon . '计划'; -$lang->searchObjects['testtask'] = '测试版本'; +$lang->searchObjects['testtask'] = '测试单'; $lang->searchObjects['doc'] = '文档'; $lang->searchObjects['testcase'] = '用例库'; $lang->searchObjects['testreport'] = '测试报告'; @@ -222,7 +222,7 @@ $lang->project->menu->story = array('link' => '需求|project|story|projectI $lang->project->menu->bug = 'Bug|project|bug|projectID=%s'; $lang->project->menu->dynamic = '动态|project|dynamic|projectID=%s'; $lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build'); -$lang->project->menu->testtask = array('link' => '测试|project|testtask|projectID=%s'); +$lang->project->menu->testtask = array('link' => '测试单|project|testtask|projectID=%s'); $lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers'); $lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc'); $lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s'; @@ -243,7 +243,7 @@ $lang->qa->menu = new stdclass(); $lang->qa->menu->product = array('link' => '%s', 'fixed' => true); $lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'); $lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s'); -$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s'); +$lang->qa->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s'); $lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s'); $lang->qa->menu->report = array('link' => '报告|testreport|browse|productID=%s'); $lang->qa->menu->caselib = array('link' => '用例库|testsuite|library'); @@ -255,7 +255,7 @@ $lang->bug->menu = new stdclass(); $lang->bug->menu->product = array('link' => '%s', 'fixed' => true); $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' => '用例|testcase|browse|productID=%s'); -$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s'); +$lang->bug->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s'); $lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s'); $lang->bug->menu->report = array('link' => '报告|testreport|browse|productID=%s'); $lang->bug->menu->caselib = array('link' => '用例库|testsuite|library'); @@ -267,7 +267,7 @@ $lang->testcase->menu = new stdclass(); $lang->testcase->menu->product = array('link' => '%s', 'fixed' => true); $lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'); $lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree'); -$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report'); +$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report'); $lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase'); $lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit'); $lang->testcase->menu->caselib = array('link' => '用例库|testsuite|library'); @@ -285,7 +285,7 @@ $lang->caselib->menu = new stdclass(); $lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true); $lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|'); $lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|'); -$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|'); +$lang->caselib->menu->testtask = array('link' => '测试单|testtask|browse|'); $lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|'); $lang->caselib->menu->report = array('link' => '报告|testreport|browse|'); $lang->caselib->menu->caselib = array('link' => '用例库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase'); @@ -680,7 +680,7 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest') $lang->menu->bug = 'Bug|bug|index'; $lang->menu->testcase = '用例|testcase|index'; $lang->menu->testsuite = '套件|testsuite|index'; - $lang->menu->testtask = '测试|testtask|index'; + $lang->menu->testtask = '测试单|testtask|index'; $lang->menu->caselib = '用例库|testsuite|library'; $lang->menuOrder[6] = 'bug';
project->beginAndEnd;?>begin . ' ~ ' . $project->end;?> +
+ begin?> + ~ + end;?> +
+
+ + ~ + +
+
-
-
- - ~ - - - - -
+
tree->parent;?> parent, "class='form-control chosen'");?>
tree->name;?> name, "class='form-control' autocomplete='off'");?>