From 3d936d7dc8a529bbf88b7892d6e5e2427d880879 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Mon, 14 Mar 2022 15:43:15 +0800 Subject: [PATCH 01/15] * fix bug #20703 --- extension/lite/execution/ext/lang/zh-cn/lite.php | 1 + extension/lite/task/ext/view/create.html.php | 5 ++++- module/task/control.php | 3 ++- module/task/js/create.js | 7 +++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/extension/lite/execution/ext/lang/zh-cn/lite.php b/extension/lite/execution/ext/lang/zh-cn/lite.php index 7999584f13..618fa15cf4 100644 --- a/extension/lite/execution/ext/lang/zh-cn/lite.php +++ b/extension/lite/execution/ext/lang/zh-cn/lite.php @@ -7,6 +7,7 @@ $lang->execution->createKanban = '创建看板'; $lang->execution->noExecution = "暂时没有看板。"; $lang->execution->importTask = '转入任务'; $lang->execution->batchCreateTask = '批量创建任务'; +$lang->execution->linkStory = "创建{$lang->SRCommon}"; $lang->execution->kanbanGroup['default'] = '默认方式'; $lang->execution->kanbanGroup['story'] = '目标'; diff --git a/extension/lite/task/ext/view/create.html.php b/extension/lite/task/ext/view/create.html.php index 6583ef2260..ff6885c62c 100644 --- a/extension/lite/task/ext/view/create.html.php +++ b/extension/lite/task/ext/view/create.html.php @@ -15,6 +15,9 @@ app->getModuleRoot() . '/common/view/sortable.html.php';?> id));?> +config->vision);?> + + @@ -95,7 +98,7 @@ task->story;?> - task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?> + task->noticeLinkStory, html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=story"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?>
story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?> preview;?> diff --git a/module/task/control.php b/module/task/control.php index 3a077b1610..829c65f99c 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -261,7 +261,8 @@ class task extends control $this->view->members = $members; $this->view->blockID = $blockID; $this->view->moduleOptionMenu = $moduleOptionMenu; - + $this->view->projectID = $projectID; + $this->view->productID = $this->loadModel('product')->getProductIDByProject($projectID);; $this->display(); } diff --git a/module/task/js/create.js b/module/task/js/create.js index 77779bc508..a9ae9e1dc4 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -275,6 +275,13 @@ function setStories(moduleID, executionID) { $('#storyBox').removeClass('hidden'); $('#story').parent().addClass('hidden'); + + /* change link when lite */ + if(vision == 'lite') + { + config.onlybody = 'no'; + $('#storyBox > a:first').attr('href', createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=' + moduleID + '&storyID=0&projectID=' + projectID + '&bugID=0&planID=0&todoID=0&extra=&type=story') + '#_single'); + } } }); } From e9806c290efaaee6a672c4cc7f4f7d058c19d916 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Mon, 14 Mar 2022 16:42:46 +0800 Subject: [PATCH 02/15] * fix bug #19430 --- extension/lite/leave/ext/view/browse.oa.html.hook.php | 7 +++++++ extension/lite/lieu/ext/view/browse.oa.html.hook.php | 7 +++++++ extension/lite/makeup/ext/view/browse.oa.html.hook.php | 7 +++++++ extension/lite/overtime/ext/view/browse.oa.html.hook.php | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 extension/lite/leave/ext/view/browse.oa.html.hook.php create mode 100644 extension/lite/lieu/ext/view/browse.oa.html.hook.php create mode 100644 extension/lite/makeup/ext/view/browse.oa.html.hook.php create mode 100644 extension/lite/overtime/ext/view/browse.oa.html.hook.php diff --git a/extension/lite/leave/ext/view/browse.oa.html.hook.php b/extension/lite/leave/ext/view/browse.oa.html.hook.php new file mode 100644 index 0000000000..cfb4b19194 --- /dev/null +++ b/extension/lite/leave/ext/view/browse.oa.html.hook.php @@ -0,0 +1,7 @@ + + diff --git a/extension/lite/lieu/ext/view/browse.oa.html.hook.php b/extension/lite/lieu/ext/view/browse.oa.html.hook.php new file mode 100644 index 0000000000..cfb4b19194 --- /dev/null +++ b/extension/lite/lieu/ext/view/browse.oa.html.hook.php @@ -0,0 +1,7 @@ + + diff --git a/extension/lite/makeup/ext/view/browse.oa.html.hook.php b/extension/lite/makeup/ext/view/browse.oa.html.hook.php new file mode 100644 index 0000000000..cfb4b19194 --- /dev/null +++ b/extension/lite/makeup/ext/view/browse.oa.html.hook.php @@ -0,0 +1,7 @@ + + diff --git a/extension/lite/overtime/ext/view/browse.oa.html.hook.php b/extension/lite/overtime/ext/view/browse.oa.html.hook.php new file mode 100644 index 0000000000..cfb4b19194 --- /dev/null +++ b/extension/lite/overtime/ext/view/browse.oa.html.hook.php @@ -0,0 +1,7 @@ + + From 937c1a64ab2423438b15b9493a8739f7bad5f5d7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 14 Mar 2022 16:49:46 +0800 Subject: [PATCH 03/15] * Fix the problem that professional R&D Kanban does not have permission to view. --- module/group/lang/resource.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 681e69b2b6..b6055c923d 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -785,6 +785,7 @@ $lang->resource->execution->addWhitelist = 'addWhitelist'; $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; $lang->resource->execution->storyEstimate = 'storyEstimate'; $lang->resource->execution->executionkanban = 'kanbanAction'; +$lang->resource->execution->kanban = 'kanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; //$lang->execution->methodOrder[0] = 'index'; @@ -840,6 +841,7 @@ $lang->execution->methodOrder[250] = 'addWhitelist'; $lang->execution->methodOrder[255] = 'unbindWhitelist'; $lang->execution->methodOrder[260] = 'storyEstimate'; $lang->execution->methodOrder[265] = 'executionkanban'; +$lang->execution->methodOrder[270] = 'kanban'; /* Task. */ $lang->resource->task = new stdclass(); From 64f44170e5c2c04817e6c15b84b3dc1d3e2370bd Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 14 Mar 2022 16:58:34 +0800 Subject: [PATCH 04/15] * Fix bug. --- db/update16.4.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/update16.4.sql b/db/update16.4.sql index acf9d93a8f..d362efa9ed 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -28,22 +28,22 @@ ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`; UPDATE `zt_user` SET `visions`='rnd,lite'; INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '管理员', 'liteUser', '迅捷版用户分组'); +('lite', '管理员', 'liteAdmin', '迅捷版用户分组'); INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '项目管理', 'liteUser', '迅捷版用户分组'); +('lite', '项目管理', 'liteProject', '迅捷版用户分组'); INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '团队成员', 'liteUser', '迅捷版用户分组'); +('lite', '团队成员', 'liteTeam', '迅捷版用户分组'); REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) -SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '管理员' and `vision` = 'lite') from `zt_grouppriv` where `group` = 1; +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteAdmin' and `vision` = 'lite') from `zt_grouppriv` where `group` = 1; REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) -SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '项目管理' and `vision` = 'lite') from `zt_grouppriv` where `group` = 4; +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteProject' and `vision` = 'lite') from `zt_grouppriv` where `group` = 4; REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) -SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '团队成员' and `vision` = 'lite') from `zt_grouppriv` where `group` = 9; +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteTeam' and `vision` = 'lite') from `zt_grouppriv` where `group` = 9; ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`; From 3c25a51bf276647f6e517ded14904ac327bdad9d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 14 Mar 2022 16:59:51 +0800 Subject: [PATCH 05/15] * Fix bug #20738. --- module/group/lang/resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index b6055c923d..4c9e654c9a 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -785,7 +785,7 @@ $lang->resource->execution->addWhitelist = 'addWhitelist'; $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; $lang->resource->execution->storyEstimate = 'storyEstimate'; $lang->resource->execution->executionkanban = 'kanbanAction'; -$lang->resource->execution->kanban = 'kanban'; +$lang->resource->execution->kanban = 'RDKanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; //$lang->execution->methodOrder[0] = 'index'; From 7cbde4dcfe0a2b644d4e46ccdf2ed444d248c389 Mon Sep 17 00:00:00 2001 From: "[denghongtao]" <[denghongtao@easycorp.ltd]> Date: Mon, 14 Mar 2022 17:01:23 +0800 Subject: [PATCH 06/15] * Add auto unit. --- test/class/project.class.php | 24 +++++++++++++++++++ test/model/project/getInfoList.php | 19 +++++++++++---- test/model/project/getStatData.php | 12 ++++++++-- test/model/project/getTeamMembers.php | 4 ++-- .../project/getTotalStoriesByProject.php | 8 ++++--- 5 files changed, 56 insertions(+), 11 deletions(-) diff --git a/test/class/project.class.php b/test/class/project.class.php index be3d90cb2c..b2a0f9d868 100644 --- a/test/class/project.class.php +++ b/test/class/project.class.php @@ -489,5 +489,29 @@ class Project $projects = $this->project->getWorkhour($projectID); } + public function getInfoList($status) + { + $projects = $this->project->getInfoList($status); + return $projects; + } + + public function getStatData($projectID) + { + $projects = $this->project->getStatData($projectID); + return $projects; + } + + public function getTotalStoriesByProject($projectID = 0, $productIdList = array(), $type = 'story', $status = 'all') + { + $projects = $this->project->getTotalStoriesByProject($projectID = 0, $productIdList = array(), $type = 'story', $status = 'all'); + return $projects; + } + + + + + + + } ?> diff --git a/test/model/project/getInfoList.php b/test/model/project/getInfoList.php index 5148c673c2..cfda53c84d 100755 --- a/test/model/project/getInfoList.php +++ b/test/model/project/getInfoList.php @@ -1,6 +1,7 @@ #!/usr/bin/env php > 0 +查询等待状态的项目 >> 项目1 +查询暂停状态的项目 >> 0 +查询关闭状态的项目 >> 0 +查询所有状态的项目 >> 项目1 */ -$project = $tester->loadModel('project'); +$project = new Project('admin'); -$undoneProject = $project->getInfoList('wait'); -var_dump($undoneProject); +$t_status = array('doing', 'wait', 'suspended', 'closed', 'all'); + +//var_dump($project->getInfoList('all'));die; +r($project->getInfoList($t_status[0])) && p() && e('0'); //查询正在进行的项目 +r($project->getInfoList($t_status[1])) && p('11:name') && e('项目1'); //查询等待状态的项目 +r($project->getInfoList($t_status[2])) && p() && e('0'); //查询暂停状态的项目 +r($project->getInfoList($t_status[3])) && p() && e('0'); //查询关闭状态的项目 +r($project->getInfoList($t_status[4])) && p('11:name') && e('项目1'); //查询所有状态的项目 \ No newline at end of file diff --git a/test/model/project/getStatData.php b/test/model/project/getStatData.php index d5b5ce7483..b35a2b081a 100755 --- a/test/model/project/getStatData.php +++ b/test/model/project/getStatData.php @@ -1,6 +1,7 @@ #!/usr/bin/env php loadModel('project'); \ No newline at end of file +//var_dump($project->getStatData(13));die; + +r($project->getStatData(13)) && p('bugCount') && e(3); //统计id=13的项目bug数量 +r($project->getStatData(13)) && p('taskCount') && e(13); //任务数量 +r($project->getStatData(13)) && p('waitCount') && e(2); //暂停数量 +r($project->getStatData(13)) && p('doingCount') && e(2); //进行的数量 +r($project->getStatData(13)) && p('finishedCount') && e(0); //完成的数量 diff --git a/test/model/project/getTeamMembers.php b/test/model/project/getTeamMembers.php index 9e4cc172b2..4f52caa5ac 100755 --- a/test/model/project/getTeamMembers.php +++ b/test/model/project/getTeamMembers.php @@ -18,5 +18,5 @@ $project = new Project('admin'); $getNu = array(11, array('admin', 'pm92'), 11, array('admin'), true); -r($project->getTeamMembers($getNu[0], $getNu[1])) && p() && e('0'); //获取id为11的项目团队成员个数 -r($project->getTeamMembers($getNu[2], $getNu[3], $getNu[4])) && p() && e('1'); //获取id为11的项目团队成员个数,开启新手引导 \ No newline at end of file +r($project->getTeamMembers($getNu[0], $getNu[1])) && p() && e('2'); //获取id为11的项目团队成员个数 +r($project->getTeamMembers($getNu[2], $getNu[3], $getNu[4])) && p() && e('1'); //获取id为11的项目团队成员个数,开启新手引导 diff --git a/test/model/project/getTotalStoriesByProject.php b/test/model/project/getTotalStoriesByProject.php index 45ad4b1bb7..696f2fe313 100755 --- a/test/model/project/getTotalStoriesByProject.php +++ b/test/model/project/getTotalStoriesByProject.php @@ -1,6 +1,7 @@ #!/usr/bin/env php loadModel('project'); \ No newline at end of file + +$project = new Project('admin'); + +var_dump($project->getTotalStoriesByProject());die; From 3c1865c527e4afb945f88f5d1f96b9d2a746aab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 14 Mar 2022 17:28:14 +0800 Subject: [PATCH 07/15] * adjust code for order by. --- module/company/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/company/control.php b/module/company/control.php index 6be397edcb..bdd9fcc09f 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -204,7 +204,7 @@ class company extends control $pager = new pager($recTotal, $recPerPage = 50, $pageID = 1); /* Append id for secend sort. */ - $order = $direction == 'next' ? 'date_desc' : 'date_asc'; + $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; $queryID = ($browseType == 'bysearch') ? (int)$param : 0; $date = empty($date) ? '' : date('Y-m-d', $date); From 75ab5773c4a552055fd34ab368edcd312160b71c Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 15 Mar 2022 09:08:14 +0800 Subject: [PATCH 08/15] * Fix bug #20741,20737,20734,20733. --- extension/lite/common/ext/lang/en/lite.php | 1 + extension/lite/common/ext/lang/zh-cn/lite.php | 1 + .../lite/product/ext/view/browse.html.php | 26 ------------------- extension/lite/todo/ext/lang/en/lite.php | 5 ++++ extension/lite/todo/ext/lang/zh-cn/lite.php | 5 ++++ 5 files changed, 12 insertions(+), 26 deletions(-) diff --git a/extension/lite/common/ext/lang/en/lite.php b/extension/lite/common/ext/lang/en/lite.php index d010fef107..661d9e63bd 100644 --- a/extension/lite/common/ext/lang/en/lite.php +++ b/extension/lite/common/ext/lang/en/lite.php @@ -58,6 +58,7 @@ $lang->my->menu->index = array('link' => "$lang->dashboard|my|index"); $lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo'); $lang->my->menu->task = array('link' => "{$lang->task->common}|my|contribute|mode=task&type=assignedTo", 'subModule' => 'task'); $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|"); +if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score'); global $config; if($config->edition != 'open') $lang->my->menu->effort = array('link' => 'Effort|effort|calendar|', 'exclude' => 'my-todo'); diff --git a/extension/lite/common/ext/lang/zh-cn/lite.php b/extension/lite/common/ext/lang/zh-cn/lite.php index f6f3feccfd..f6b37feac0 100644 --- a/extension/lite/common/ext/lang/zh-cn/lite.php +++ b/extension/lite/common/ext/lang/zh-cn/lite.php @@ -58,6 +58,7 @@ $lang->my->menu->index = array('link' => "$lang->dashboard|my|index"); $lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo'); $lang->my->menu->task = array('link' => "{$lang->task->common}|my|contribute|mode=task&type=assignedTo", 'subModule' => 'task'); $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|"); +if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score'); global $config; if($config->edition != 'open') $lang->my->menu->effort = array('link' => '日志|effort|calendar|', 'exclude' => 'my-todo'); diff --git a/extension/lite/product/ext/view/browse.html.php b/extension/lite/product/ext/view/browse.html.php index ffffa96aca..2735bcf69a 100644 --- a/extension/lite/product/ext/view/browse.html.php +++ b/extension/lite/product/ext/view/browse.html.php @@ -376,29 +376,6 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; echo "
  • " . html::a('javascript:;', $lang->story->review, '', $class) . '
  • '; } - - if($storyType == 'story') - { - if($canBatchChangeStage) - { - echo "'; - } - else - { - $class= "class='disabled'"; - echo "
  • " . html::a('javascript:;', $lang->story->stageAB, '', $class) . '
  • '; - } - } ?>
    @@ -462,9 +439,6 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; - - story->importToLib, '', 'class="btn" data-toggle="modal" id="importToLib"');?> -
    show('right', 'pagerjs');?> diff --git a/extension/lite/todo/ext/lang/en/lite.php b/extension/lite/todo/ext/lang/en/lite.php index 43a7402c0c..d27984e77d 100644 --- a/extension/lite/todo/ext/lang/en/lite.php +++ b/extension/lite/todo/ext/lang/en/lite.php @@ -3,3 +3,8 @@ $lang->todo->typeList['task'] = 'Task'; unset($lang->todo->typeList['bug']); unset($lang->todo->typeList['testtask']); +unset($lang->todo->typeList['review']); +unset($lang->todo->typeList['issue']); +unset($lang->todo->typeList['risk']); +unset($lang->todo->typeList['opportunity']); +unset($lang->todo->typeList['meeting']); diff --git a/extension/lite/todo/ext/lang/zh-cn/lite.php b/extension/lite/todo/ext/lang/zh-cn/lite.php index 7b162f90ef..c3f4110cde 100644 --- a/extension/lite/todo/ext/lang/zh-cn/lite.php +++ b/extension/lite/todo/ext/lang/zh-cn/lite.php @@ -3,3 +3,8 @@ $lang->todo->typeList['task'] = '任务'; unset($lang->todo->typeList['bug']); unset($lang->todo->typeList['testtask']); +unset($lang->todo->typeList['review']); +unset($lang->todo->typeList['issue']); +unset($lang->todo->typeList['risk']); +unset($lang->todo->typeList['opportunity']); +unset($lang->todo->typeList['meeting']); From 91e99b699b3a6ac8b0ddb34f05968fa79e09c831 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 15 Mar 2022 09:36:13 +0800 Subject: [PATCH 09/15] * Fix bug #20751. --- module/block/view/recentprojectblock.html.php | 18 +++++++++++------- module/project/lang/en.php | 1 + module/project/lang/zh-cn.php | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/module/block/view/recentprojectblock.html.php b/module/block/view/recentprojectblock.html.php index d55e356c80..9b5c391e02 100644 --- a/module/block/view/recentprojectblock.html.php +++ b/module/block/view/recentprojectblock.html.php @@ -11,7 +11,7 @@ #cards .panel-heading {padding: 12px 24px 10px 16px;} #cards .panel-body {padding: 0 16px 16px;} #cards .panel-actions {padding: 7px 0; z-index: 0} -#cards .project-type-label {padding: 1px 2px;} +#cards .project-type-label {padding: 2px 2px; margin-bottom: 3px;} #cards .project-name {font-size: 16px; font-weight: normal; display: inline-block; max-width: 75%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;} #cards .project-infos {font-size: 12px; padding: 0 15px;} #cards .project-infos > span {display: inline-block; line-height: 12px;} @@ -44,11 +44,15 @@
    - model === 'waterfall'): ?> - project->waterfall; ?> - - project->scrum; ?> - + systemMode == 'new'):?> + model === 'waterfall'):?> + project->waterfall;?> + model === 'kanban'):?> + project->kanban;?> + + project->scrum;?> + + name);?>