From 59071fe947564d52c0c5d054f431d73dd1af65d5 Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 12 Nov 2018 15:39:46 +0800 Subject: [PATCH 01/32] * Finish task #5108. --- module/testtask/view/caseheader.html.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php index 1c69500f5a..6a7d5bba80 100644 --- a/module/testtask/view/caseheader.html.php +++ b/module/testtask/view/caseheader.html.php @@ -47,6 +47,7 @@ common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'button', 'link'); common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'export'); common::printIcon('testtask', 'report', "productID=$productID&taskID=$task->id&browseType=$browseType&branchID=$task->branch&moduleID=" . (empty($moduleID) ? '' : $moduleID)); + common::printIcon('testtask', 'view', "taskID=$task->id", '', 'button', 'list-alt'); common::printBack($this->session->testtaskList, 'btn btn-link'); ?> From 9a2a2b234ddc10541a62db6cfbbb7ff3c71847e3 Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 12 Nov 2018 15:52:20 +0800 Subject: [PATCH 02/32] * Fix module orderBy. --- module/tree/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index 727947d595..d7db9d4dee 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -226,7 +226,7 @@ class treeModel extends model $modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task' and parent != 0) OR (root = $id and type = 'story'))") ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->andWhere('deleted')->eq(0) - ->orderBy('grade desc, branch, type, `order`') + ->orderBy('grade desc, type, `order`') ->fetchAll('id'); } else @@ -234,7 +234,7 @@ class treeModel extends model $modules = $this->dao->select('*')->from(TABLE_MODULE)->where("root = '" . (int)$rootID . "' and type = 'task' and path like '%,$id,%'") ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->andWhere('deleted')->eq(0) - ->orderBy('grade desc, type, `order`') + ->orderBy('grade desc, branch, type, `order`') ->fetchAll('id'); } From e29d9990aa71611abea04b537cbfa678e1d584f2 Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 12 Nov 2018 15:55:47 +0800 Subject: [PATCH 03/32] * Fix module orderBy. --- module/tree/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/tree/model.php b/module/tree/model.php index d7db9d4dee..ee3370cd47 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -234,7 +234,7 @@ class treeModel extends model $modules = $this->dao->select('*')->from(TABLE_MODULE)->where("root = '" . (int)$rootID . "' and type = 'task' and path like '%,$id,%'") ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->andWhere('deleted')->eq(0) - ->orderBy('grade desc, branch, type, `order`') + ->orderBy('grade desc, type, `order`') ->fetchAll('id'); } From ca488859261aa930523891fc709b4090fda6b9a3 Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 12 Nov 2018 16:39:56 +0800 Subject: [PATCH 04/32] * Fix project warning. --- module/project/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/control.php b/module/project/control.php index 9739edd654..269da8c35f 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -2323,9 +2323,9 @@ class project extends control { $planStories = $planProducts = array(); $planStory = $this->loadModel('story')->getPlanStories($planID); + $count = 0; if(!empty($planStory)) { - $count = 0; foreach($planStory as $id => $story) { if($story->status == 'draft') From 92ce72bfadd95ad9d17a83a898b006f3a098e7b8 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Mon, 12 Nov 2018 17:00:22 +0800 Subject: [PATCH 05/32] * Finish task #5106. --- module/bug/view/view.html.php | 3 +++ module/story/view/view.html.php | 3 +++ module/task/view/view.html.php | 8 ++++++++ module/testcase/view/view.html.php | 3 +++ 4 files changed, 17 insertions(+) diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index a9f749418d..0c845cc9eb 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -27,6 +27,9 @@ +
+ product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "" . $lang->bug->create, '', "class='btn btn-primary'"); ?> +
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index c2056d2b03..940d4c1200 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -41,6 +41,9 @@
+
+ product}&branch={$story->branch}&moduleID={$story->module}", "" . $lang->story->create, '', "class='btn btn-primary'"); ?> +
diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 6a786ffdc1..98368ec0bf 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -34,6 +34,14 @@
+
+ project = $task->project; + $link = $this->createLink('task', 'create', "project={$task->project}&storyID={$task->story}&moduleID={$task->module}"); + if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); + ?> +
diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 0fcd00daf2..2d5933b584 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -44,6 +44,9 @@
+
+ product}&branch={$case->branch}&moduleID={$case->module}", "" . $lang->testcase->create, '', "class='btn btn-primary'"); ?> +
From b863fe5f92e354101cab49c9febb2b57e390e7c7 Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 12 Nov 2018 17:00:22 +0800 Subject: [PATCH 06/32] * Finish task #5109. --- module/testtask/config.php | 2 +- module/testtask/control.php | 1 + module/testtask/model.php | 2 +- module/testtask/view/edit.html.php | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/testtask/config.php b/module/testtask/config.php index 130f031c8d..56e201e186 100644 --- a/module/testtask/config.php +++ b/module/testtask/config.php @@ -7,7 +7,7 @@ $config->testtask->edit->requiredFields = 'project,build,begin,end,name'; $config->testtask->editor = new stdclass(); $config->testtask->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->testtask->editor->edit = array('id' => 'desc,report', 'tools' => 'simpleTools'); +$config->testtask->editor->edit = array('id' => 'desc,report,comment', 'tools' => 'simpleTools'); $config->testtask->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools'); $config->testtask->editor->start = array('id' => 'comment', 'tools' => 'simpleTools'); $config->testtask->editor->close = array('id' => 'report,comment', 'tools' => 'simpleTools'); diff --git a/module/testtask/control.php b/module/testtask/control.php index cc24d6b0b1..92ecde705a 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -456,6 +456,7 @@ class testtask extends control $actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited'); $this->action->logHistory($actionID, $changes); } + if($this->post->comment != '') $actionID = $this->action->create('testtask', $taskID, 'Commented', $this->post->comment); die(js::locate(inlink('view', "taskID=$taskID"), 'parent')); } diff --git a/module/testtask/model.php b/module/testtask/model.php index 0143100407..31ea1eb449 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -603,7 +603,7 @@ class testtaskModel extends model public function update($taskID) { $oldTask = $this->dao->select("*")->from(TABLE_TESTTASK)->where('id')->eq((int)$taskID)->fetch(); - $task = fixer::input('post')->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags)->join('mailto', ',')->remove('uid')->get(); + $task = fixer::input('post')->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags)->join('mailto', ',')->remove('uid,comment')->get(); $task = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->edit['id'], $this->post->uid); $this->dao->update(TABLE_TESTTASK)->data($task) ->autoCheck() diff --git a/module/testtask/view/edit.html.php b/module/testtask/view/edit.html.php index 6882bf4ea6..19e33cc1ba 100644 --- a/module/testtask/view/edit.html.php +++ b/module/testtask/view/edit.html.php @@ -70,6 +70,10 @@ testtask->desc;?> desc), "rows=10 class='form-control'");?> + + comment;?> + + testtask->mailto;?> From 70e0591023a47e141bb976357e1cc04a2144ef0e Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 12 Nov 2018 17:09:27 +0800 Subject: [PATCH 07/32] * Fix parent task status. --- module/task/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index b26e7c12b4..474ed9049b 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -684,7 +684,11 @@ class taskModel extends model { if($task->status == 'done') $this->loadModel('score')->create('task', 'finish', $taskID); if($task->status == 'closed') $this->loadModel('score')->create('task', 'close', $taskID); - if($task->parent) $this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($task->parent)->exec(); + if($task->parent) + { + $this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($task->parent)->exec(); + $this->updateParentStatus($taskID); + } $this->file->updateObjectID($this->post->uid, $taskID, 'task'); return common::createChanges($oldTask, $task); } From c30ce17efc325a03e291a2d311ce0c7988d9ecc4 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Mon, 12 Nov 2018 17:41:30 +0800 Subject: [PATCH 08/32] * Fix error variable name. --- module/task/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index 474ed9049b..d1ae040a23 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -542,7 +542,7 @@ class taskModel extends model if(($oldTask->assignedTo != $currentTask->assignedTo or $currentTask->status == 'done') and isset($team[$this->app->user->account]) and $team[$this->app->user->account]->left == 0 - and strpos($oldTask->finishedLis, ",{$this->app->user->account},") === false) + and strpos($oldTask->finishedList, ",{$this->app->user->account},") === false) { $currentTask->finishedList = ',' . trim(trim($oldTask->finishedList, ',') . ",{$this->app->user->account}", ',') . ','; } From 3f5f48fd50c7753f08121f004d7b5f8a273af9c7 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 13 Nov 2018 09:51:17 +0800 Subject: [PATCH 09/32] * finish task #5078. --- module/action/view/trash.html.php | 4 +-- module/admin/view/sso.html.php | 3 ++ module/backup/view/index.html.php | 4 +-- module/common/lang/en.php | 42 +++++++++++++++++++------ module/common/lang/menuOrder.php | 40 ++++++++++++++---------- module/common/lang/zh-cn.php | 46 +++++++++++++++++++++------- module/common/model.php | 41 +++++++++++++++++++++++++ module/cron/view/create.html.php | 3 ++ module/cron/view/edit.html.php | 3 ++ module/cron/view/index.html.php | 4 +-- module/dev/view/header.html.php | 8 +---- module/entry/view/create.html.php | 2 +- module/entry/view/edit.html.php | 2 +- module/entry/view/header.html.php | 4 +-- module/entry/view/log.html.php | 2 +- module/mail/js/common.js | 1 - module/message/view/header.html.php | 11 +------ module/message/view/setting.html.php | 3 -- module/webhook/view/header.html.php | 11 +------ 19 files changed, 152 insertions(+), 82 deletions(-) diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 5295c533b5..a54bc7bda2 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -12,9 +12,7 @@ ?>