From d6266bc607b0cf6a885a218e577f7b797cb66099 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 20 Feb 2023 14:47:10 +0800 Subject: [PATCH 1/5] * Code for finish task #85047. --- config/zentaopms.php | 14 ++++---- framework/helper.class.php | 4 +-- module/admin/lang/de.php | 8 +++-- module/admin/lang/en.php | 8 +++-- module/admin/lang/fr.php | 8 +++-- module/admin/lang/menu.php | 20 +++++++++-- module/admin/lang/zh-cn.php | 8 +++-- module/block/control.php | 38 +++++++++++++++++--- module/dev/config.php | 3 -- module/dev/view/api.html.php | 1 - module/group/lang/resource.php | 8 ++--- module/my/lang/de.php | 2 +- module/my/lang/en.php | 2 +- module/my/lang/fr.php | 2 +- module/my/lang/zh-cn.php | 2 +- module/project/lang/de.php | 2 +- module/project/lang/en.php | 2 +- module/project/lang/fr.php | 2 +- module/project/lang/zh-cn.php | 2 +- module/project/view/ajaxgetdropmenu.html.php | 14 ++++---- module/project/view/createguide.html.php | 6 ++-- 21 files changed, 103 insertions(+), 53 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 170afc14b9..68b7f8b1b8 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -429,9 +429,11 @@ $config->maxPriValue = '256'; $config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback', 'ticket'); $config->featureGroup = new stdclass(); -$config->featureGroup->my = array('score'); -$config->featureGroup->product = array('roadmap', 'track', 'UR'); -$config->featureGroup->scrum = array(); -$config->featureGroup->waterfall = array(); -$config->featureGroup->assetlib = array(); -$config->featureGroup->other = array('devops', 'kanban'); +$config->featureGroup->my = array('score'); +$config->featureGroup->product = array('roadmap', 'track', 'UR'); +$config->featureGroup->scrum = array(); +$config->featureGroup->waterfall = array(); +$config->featureGroup->agileplus = array(); +$config->featureGroup->waterfallplus = array(); +$config->featureGroup->assetlib = array(); +$config->featureGroup->other = array('devops', 'kanban'); diff --git a/framework/helper.class.php b/framework/helper.class.php index a69af8d858..e00cefbd13 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -96,7 +96,7 @@ class helper extends baseHelper } else { - if($feature == 'scrum' or $feature == 'waterfall') return strpos(",$config->disabledFeatures,", ",{$feature},") === false; + if(in_array($feature, array('scrum', 'waterfall', 'agileplus', 'waterfallplus'))) return strpos(",$config->disabledFeatures,", ",{$feature},") === false; $hasFeature = false; $canConfigFeature = false; @@ -107,7 +107,7 @@ class helper extends baseHelper if($feature == $group or $feature == $module) { $canConfigFeature = true; - if($group == 'scrum' or $group == 'waterfall') + if(in_array($group, array('scrum', 'waterfall', 'agileplus', 'waterfallplus'))) { if(helper::hasFeature("{$group}") and helper::hasFeature("{$group}_{$module}")) $hasFeature = true; } diff --git a/module/admin/lang/de.php b/module/admin/lang/de.php index 115ee795ec..6ba6dae130 100755 --- a/module/admin/lang/de.php +++ b/module/admin/lang/de.php @@ -86,9 +86,11 @@ $lang->admin->setModule->opened = 'Opened'; $lang->admin->setModule->closed = 'Closed'; $lang->admin->setModule->my = 'My'; -$lang->admin->setModule->product = 'Product'; -$lang->admin->setModule->scrum = 'Scrum Project'; -$lang->admin->setModule->waterfall = 'Waterfall Project'; +$lang->admin->setModule->product = $lang->productCommon; +$lang->admin->setModule->scrum = 'Scrum ' . $lang->projectCommon; +$lang->admin->setModule->waterfall = 'Waterfall ' . $lang->projectCommon; +$lang->admin->setModule->agileplus = 'Agile + ' . $lang->projectCommon; +$lang->admin->setModule->waterfallplus = 'Waterfall + ' . $lang->projectCommon; $lang->admin->setModule->assetlib = 'Assetlib'; $lang->admin->setModule->other = 'Other'; diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php index f377b35bad..aba1645159 100755 --- a/module/admin/lang/en.php +++ b/module/admin/lang/en.php @@ -86,9 +86,11 @@ $lang->admin->setModule->opened = 'Opened'; $lang->admin->setModule->closed = 'Closed'; $lang->admin->setModule->my = 'My'; -$lang->admin->setModule->product = 'Product'; -$lang->admin->setModule->scrum = 'Scrum Project'; -$lang->admin->setModule->waterfall = 'Waterfall Project'; +$lang->admin->setModule->product = $lang->productCommon; +$lang->admin->setModule->scrum = 'Scrum ' . $lang->projectCommon; +$lang->admin->setModule->waterfall = 'Waterfall ' . $lang->projectCommon; +$lang->admin->setModule->agileplus = 'Agile + ' . $lang->projectCommon; +$lang->admin->setModule->waterfallplus = 'Waterfall + ' . $lang->projectCommon; $lang->admin->setModule->assetlib = 'Assetlib'; $lang->admin->setModule->other = 'Other'; diff --git a/module/admin/lang/fr.php b/module/admin/lang/fr.php index 416bdc6965..71acb72380 100755 --- a/module/admin/lang/fr.php +++ b/module/admin/lang/fr.php @@ -86,9 +86,11 @@ $lang->admin->setModule->opened = 'Opened'; $lang->admin->setModule->closed = 'Closed'; $lang->admin->setModule->my = 'My'; -$lang->admin->setModule->product = 'Product'; -$lang->admin->setModule->scrum = 'Scrum Project'; -$lang->admin->setModule->waterfall = 'Waterfall Project'; +$lang->admin->setModule->product = $lang->productCommon; +$lang->admin->setModule->scrum = 'Scrum ' . $lang->projectCommon; +$lang->admin->setModule->waterfall = 'Waterfall ' . $lang->projectCommon; +$lang->admin->setModule->agileplus = 'Agile + ' . $lang->projectCommon; +$lang->admin->setModule->waterfallplus = 'Waterfall + ' . $lang->projectCommon; $lang->admin->setModule->assetlib = 'Assetlib'; $lang->admin->setModule->other = 'Other'; diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 28890757f0..09d1b62349 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -167,15 +167,25 @@ $lang->admin->menuList->dev['menuOrder']['10'] = 'db'; $lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; $lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; -if($config->edition != 'max') unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10'], $lang->admin->menuList->template); +if($config->edition != 'max') +{ + unset($lang->admin->menuList->model['subMenu']['scrum']); + unset($lang->admin->menuList->model['subMenu']['agileplus']); + unset($lang->admin->menuList->model['menuOrder']['10']); + unset($lang->admin->menuList->model['menuOrder']['20']); + unset($lang->admin->menuList->template); +} if(!helper::hasFeature('waterfall')) { unset($lang->admin->menuList->model['subMenu']['waterfall']); + unset($lang->admin->menuList->model['subMenu']['waterfallplus']); unset($lang->admin->menuList->model['menuOrder']['15']); + unset($lang->admin->menuList->model['menuOrder']['25']); } -if($config->edition == 'max' and !helper::hasFeature('scrum_auditplan')) +if($config->edition == 'max') { - if(!helper::hasFeature('scrum_process')) unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10']); + if(!helper::hasFeature('scrum_auditplan') and !helper::hasFeature('scrum_process')) unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10']); + if(!helper::hasFeature('agileplus_auditplan') and !helper::hasFeature('agileplus_process')) unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10']); } if($config->vision == 'lite') @@ -189,8 +199,12 @@ if($config->vision == 'lite') unset($lang->admin->menuList->model['subMenu']['scrum']); unset($lang->admin->menuList->model['subMenu']['waterfall']); + unset($lang->admin->menuList->model['subMenu']['agileplus']); + unset($lang->admin->menuList->model['subMenu']['waterfallplus']); unset($lang->admin->menuList->model['menuOrder']['10']); unset($lang->admin->menuList->model['menuOrder']['15']); + unset($lang->admin->menuList->model['menuOrder']['20']); + unset($lang->admin->menuList->model['menuOrder']['25']); unset($lang->admin->menuList->feature['subMenu']['product']); unset($lang->admin->menuList->feature['subMenu']['execution']); diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index 926dede079..ab9f757940 100755 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -86,9 +86,11 @@ $lang->admin->setModule->opened = '已开启'; $lang->admin->setModule->closed = '已关闭'; $lang->admin->setModule->my = '地盘'; -$lang->admin->setModule->product = '产品'; -$lang->admin->setModule->scrum = '敏捷项目'; -$lang->admin->setModule->waterfall = '瀑布项目'; +$lang->admin->setModule->product = $lang->productCommon; +$lang->admin->setModule->scrum = '敏捷' . $lang->projectCommon; +$lang->admin->setModule->waterfall = '瀑布' . $lang->projectCommon; +$lang->admin->setModule->agileplus = '融合敏捷' . $lang->projectCommon; +$lang->admin->setModule->waterfallplus = '融合瀑布' . $lang->projectCommon; $lang->admin->setModule->assetlib = '资产库'; $lang->admin->setModule->other = '通用功能'; diff --git a/module/block/control.php b/module/block/control.php index b65269bc6c..78edb264b5 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -78,7 +78,25 @@ class block extends control elseif(isset($this->lang->block->moduleList[$module])) { $this->get->set('mode', 'getblocklist'); - if($module == 'project') $this->get->set('dashboard', 'project'); + if($module == 'project') + { + $this->get->set('dashboard', 'project'); + + if($this->config->edition == 'max' and $this->app->tab == 'project') + { + $project = $this->loadModel('project')->getByID($this->session->project); + if(isset($project->model) and !helper::hasFeature("{$project->model}_issue")) + { + unset($this->lang->block->modules['scrum']['index']->availableBlocks->scrumissue); + unset($this->lang->block->modules['waterfall']['index']->availableBlocks->waterfallissue); + } + if(isset($project->model) and !helper::hasFeature("{$project->model}_risk")) + { + unset($this->lang->block->modules['scrum']['index']->availableBlocks->scrumrisk); + unset($this->lang->block->modules['waterfall']['index']->availableBlocks->waterfallrisk); + } + } + } $this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id"); $this->view->module = $module; } @@ -253,10 +271,20 @@ class block extends control $shortBlocks = $longBlocks = array(); foreach($blocks as $key => $block) { - if($block->block == 'waterfallrisk' and !helper::hasFeature('waterfall_risk')) continue; - if($block->block == 'waterfallissue' and !helper::hasFeature('waterfall_issue')) continue; - if($block->block == 'scrumrisk' and !helper::hasFeature('scrum_risk')) continue; - if($block->block == 'scrumissue' and !helper::hasFeature('scrum_issue')) continue; + if(in_array($block->block, array('waterfallrisk', 'waterfallissue'))) + { + $model = isset($project->model) ? $project->model : 'waterfall'; + if($block->block == 'waterfallrisk' and !helper::hasFeature("{$model}_risk")) continue; + if($block->block == 'waterfallissue' and !helper::hasFeature("{$model}_issue")) continue; + } + + if(in_array($block->block, array('scrumrisk', 'scrumissue'))) + { + $model = isset($project->model) ? $project->model : 'scrum'; + if($block->block == 'scrumrisk' and !helper::hasFeature("{$model}_risk")) continue; + if($block->block == 'scrumissue' and !helper::hasFeature("{$model}_issue")) continue; + } + if(!empty($block->source) and $block->source != 'todo' and !empty($acls['views']) and !isset($acls['views'][$block->source])) { unset($blocks[$key]); diff --git a/module/dev/config.php b/module/dev/config.php index 697b172c04..108c481640 100644 --- a/module/dev/config.php +++ b/module/dev/config.php @@ -240,6 +240,3 @@ $config->dev->postParams['testcase']['create']['steps'] = 'string'; $config->dev->postParams['testcase']['create']['expect'] = 'string'; $config->dev->postParams['testcase']['create']['mailto'] = 'string'; $config->dev->postParams['testcase']['create']['keywords'] = 'string'; - -$config->disableFeature = array(); -if(!helper::hasFeature('waterfall')) $config->disableFeature = array('design', 'stage', 'programplan', 'weekly', 'researchplan', 'researchreport', 'gapanalysis'); diff --git a/module/dev/view/api.html.php b/module/dev/view/api.html.php index 3bdb9b80a8..914b930f84 100644 --- a/module/dev/view/api.html.php +++ b/module/dev/view/api.html.php @@ -9,7 +9,6 @@
disableFeature and in_array($module, $config->disableFeature)) continue; $active = ($module == $selectedModule) ? 'text-primary' : ''; $moduleName = zget($lang->dev->tableList, $module, $module); ?> diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index ac6c5c578b..08c5b3da71 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -2017,15 +2017,15 @@ if(!$inUpgrade) unset($lang->resource->program); unset($lang->resource->project->programTitle); } - if(!helper::hasFeature('waterfall')) + if(!helper::hasFeature('waterfall') and !helper::hasFeature('waterfallplus')) { unset($lang->resource->design); unset($lang->resource->programplan); unset($lang->resource->stage); } - if(!helper::hasFeature('product_track')) unset($lang->resource->product->track); - if(!helper::hasFeature('product_roadmap')) unset($lang->resource->product->roadmap); - if(!helper::hasFeature('waterfall_track')) unset($lang->resource->projectstory->track); + if(!helper::hasFeature('product_track')) unset($lang->resource->product->track); + if(!helper::hasFeature('product_roadmap')) unset($lang->resource->product->roadmap); + if(!helper::hasFeature('waterfall_track') and !helper::hasFeature('waterfallplus_track')) unset($lang->resource->projectstory->track); if(!helper::hasFeature('devops')) { unset($lang->resource->repo); diff --git a/module/my/lang/de.php b/module/my/lang/de.php index b508fa00cc..1d9f272c19 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -99,7 +99,7 @@ $lang->my->auditMenu->audit = new stdclass(); $lang->my->auditMenu->audit->all = 'All'; $lang->my->auditMenu->audit->story = 'Story'; $lang->my->auditMenu->audit->testcase = 'Case'; -if($config->edition == 'max' and helper::hasFeature('waterfall')) $lang->my->auditMenu->audit->project = 'Project'; +if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->auditMenu->audit->project = $lang->projectCommon; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->auditMenu->audit->oa = 'OA'; diff --git a/module/my/lang/en.php b/module/my/lang/en.php index b508fa00cc..1d9f272c19 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -99,7 +99,7 @@ $lang->my->auditMenu->audit = new stdclass(); $lang->my->auditMenu->audit->all = 'All'; $lang->my->auditMenu->audit->story = 'Story'; $lang->my->auditMenu->audit->testcase = 'Case'; -if($config->edition == 'max' and helper::hasFeature('waterfall')) $lang->my->auditMenu->audit->project = 'Project'; +if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->auditMenu->audit->project = $lang->projectCommon; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->auditMenu->audit->oa = 'OA'; diff --git a/module/my/lang/fr.php b/module/my/lang/fr.php index b508fa00cc..1d9f272c19 100644 --- a/module/my/lang/fr.php +++ b/module/my/lang/fr.php @@ -99,7 +99,7 @@ $lang->my->auditMenu->audit = new stdclass(); $lang->my->auditMenu->audit->all = 'All'; $lang->my->auditMenu->audit->story = 'Story'; $lang->my->auditMenu->audit->testcase = 'Case'; -if($config->edition == 'max' and helper::hasFeature('waterfall')) $lang->my->auditMenu->audit->project = 'Project'; +if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->auditMenu->audit->project = $lang->projectCommon; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = 'Feedback'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->auditMenu->audit->oa = 'OA'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index 545768b7ea..b6e0038cf1 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -99,7 +99,7 @@ $lang->my->auditMenu->audit = new stdclass(); $lang->my->auditMenu->audit->all = '所有'; $lang->my->auditMenu->audit->story = '需求'; $lang->my->auditMenu->audit->testcase = '用例'; -if($config->edition == 'max' and helper::hasFeature('waterfall')) $lang->my->auditMenu->audit->project = '项目'; +if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->auditMenu->audit->project = $lang->projectCommon; if($config->edition != 'open') $lang->my->auditMenu->audit->feedback = '反馈'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->auditMenu->audit->oa = '办公'; diff --git a/module/project/lang/de.php b/module/project/lang/de.php index dfd375a94d..91198d2690 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -272,7 +272,7 @@ $lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "CMMI"; $lang->project->modelList['kanban'] = "Kanban"; $lang->project->modelList['agileplus'] = "Agile +"; -if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfallplus'] = "Waterfall +"; +if(helper::hasFeature('waterfallplus')) $lang->project->modelList['waterfallplus'] = "Waterfall +"; $lang->project->featureBar['browse']['all'] = 'All'; $lang->project->featureBar['browse']['undone'] = 'Unfinished'; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index d25999685f..5092070e59 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -272,7 +272,7 @@ $lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "CMMI"; $lang->project->modelList['kanban'] = "Kanban"; $lang->project->modelList['agileplus'] = "Agile +"; -if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfallplus'] = "Waterfall +"; +if(helper::hasFeature('waterfallplus')) $lang->project->modelList['waterfallplus'] = "Waterfall +"; $lang->project->featureBar['browse']['all'] = 'All'; $lang->project->featureBar['browse']['undone'] = 'Unfinished'; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index 5e82bde244..73c3749268 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -272,7 +272,7 @@ $lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "CMMI"; $lang->project->modelList['kanban'] = "Kanban"; $lang->project->modelList['agileplus'] = "Agile +"; -if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfallplus'] = "Waterfall +"; +if(helper::hasFeature('waterfallplus')) $lang->project->modelList['waterfallplus'] = "Waterfall +"; $lang->project->featureBar['browse']['all'] = 'All'; $lang->project->featureBar['browse']['undone'] = 'Non Terminées'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index be8f261079..6721e62b8c 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -272,7 +272,7 @@ $lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "瀑布"; $lang->project->modelList['kanban'] = "看板"; $lang->project->modelList['agileplus'] = "融合敏捷"; -if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfallplus'] = "融合瀑布"; +if(helper::hasFeature('waterfallplus')) $lang->project->modelList['waterfallplus'] = "融合瀑布"; $lang->project->featureBar['browse']['all'] = '全部'; $lang->project->featureBar['browse']['undone'] = '未完成'; diff --git a/module/project/view/ajaxgetdropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php index 6c51b4d224..b21bb7acc5 100644 --- a/module/project/view/ajaxgetdropmenu.html.php +++ b/module/project/view/ajaxgetdropmenu.html.php @@ -80,19 +80,19 @@ foreach($projects as $programID => $programProjects) { $link = $indexLink; } - elseif($project->model == 'scrum' and + elseif((in_array($project->model, array('scrum', 'agileplus'))) and ( - (in_array($module, array('issue', 'risk', 'meeting')) and !helper::hasFeature("scrum_{$module}")) or - ($module == 'report' and $method == 'projectsummary' and !helper::hasFeature("scrum_measrecord")) + (in_array($module, array('issue', 'risk', 'meeting')) and !helper::hasFeature("{$project->model}_{$module}")) or + ($module == 'report' and $method == 'projectsummary' and !helper::hasFeature("{$project->model}_measrecord")) )) { $link = $indexLink; } - elseif($project->model == 'waterfall' and + elseif(in_array($project->model, array('waterfall', 'waterfallplus')) and ( - (in_array($module, array('issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'meeting')) and !helper::hasFeature("waterfall_{$module}")) or - ($module == 'pssp' and !helper::hasFeature("waterfall_process")) or - ($module == 'report' and $method == 'projectsummary' and !helper::hasFeature("scrum_measrecord")) + (in_array($module, array('issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'meeting')) and !helper::hasFeature("{$project->model}_{$module}")) or + ($module == 'pssp' and !helper::hasFeature("{$project->model}_process")) or + ($module == 'report' and $method == 'projectsummary' and !helper::hasFeature("{$project->model}_measrecord")) )) { $link = $indexLink; diff --git a/module/project/view/createguide.html.php b/module/project/view/createguide.html.php index 14a5710c35..83a4e2912a 100644 --- a/module/project/view/createguide.html.php +++ b/module/project/view/createguide.html.php @@ -29,7 +29,9 @@ tab; if($tab == 'product') $tab = 'project'; - $hasWaterfall = helper::hasFeature('waterfall'); + + $hasWaterfall = helper::hasFeature('waterfall'); + $hasWaterfallPlus = helper::hasFeature('waterfallplus'); ?>
createLink("project", "create", "model=scrum&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='{$tab}' class='createButton'")?> @@ -60,7 +62,7 @@

project->agileplusTitle;?>

- +
createLink("project", "create", "model=waterfallplus&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='{$tab}' class='createButton'")?> From 71c60b8332991492bb5d2bd079326e14c9922cba Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Feb 2023 09:30:09 +0800 Subject: [PATCH 2/5] * Code for finish task #85047. --- module/admin/lang/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 09d1b62349..ca559e22e9 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -185,7 +185,7 @@ if(!helper::hasFeature('waterfall')) if($config->edition == 'max') { if(!helper::hasFeature('scrum_auditplan') and !helper::hasFeature('scrum_process')) unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10']); - if(!helper::hasFeature('agileplus_auditplan') and !helper::hasFeature('agileplus_process')) unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10']); + if(!helper::hasFeature('agileplus_auditplan') and !helper::hasFeature('agileplus_process')) unset($lang->admin->menuList->model['subMenu']['agileplus'], $lang->admin->menuList->model['menuOrder']['20']); } if($config->vision == 'lite') From 71151c93dfe6cf448730452543eb7faa1e663349 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Feb 2023 10:16:35 +0800 Subject: [PATCH 3/5] * Delete useless language items. --- module/mail/lang/de.php | 1 - module/mail/lang/en.php | 1 - module/mail/lang/fr.php | 1 - module/mail/lang/zh-cn.php | 1 - 4 files changed, 4 deletions(-) diff --git a/module/mail/lang/de.php b/module/mail/lang/de.php index d52845f176..572e19a838 100644 --- a/module/mail/lang/de.php +++ b/module/mail/lang/de.php @@ -1,5 +1,4 @@ mail->common = 'Email Einstellungen'; $lang->mail->index = 'Home'; $lang->mail->detect = 'Testen'; $lang->mail->detectAction = 'Detect By Email Address'; diff --git a/module/mail/lang/en.php b/module/mail/lang/en.php index 8c363ee2e3..657c5e8fec 100755 --- a/module/mail/lang/en.php +++ b/module/mail/lang/en.php @@ -1,5 +1,4 @@ mail->common = 'Email Settings'; $lang->mail->index = 'Email Home'; $lang->mail->detect = 'Detect'; $lang->mail->detectAction = 'Detect By Email Address'; diff --git a/module/mail/lang/fr.php b/module/mail/lang/fr.php index 8c363ee2e3..657c5e8fec 100644 --- a/module/mail/lang/fr.php +++ b/module/mail/lang/fr.php @@ -1,5 +1,4 @@ mail->common = 'Email Settings'; $lang->mail->index = 'Email Home'; $lang->mail->detect = 'Detect'; $lang->mail->detectAction = 'Detect By Email Address'; diff --git a/module/mail/lang/zh-cn.php b/module/mail/lang/zh-cn.php index f90a6bf78b..5aa4390587 100755 --- a/module/mail/lang/zh-cn.php +++ b/module/mail/lang/zh-cn.php @@ -1,5 +1,4 @@ mail->common = '发信配置'; $lang->mail->index = '首页'; $lang->mail->detect = '检测'; $lang->mail->detectAction = '通过邮箱地址检测'; From 517fb3c7969b6fba05481501a43a030a9b6b093d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Feb 2023 13:13:13 +0800 Subject: [PATCH 4/5] * Code for finish task #85046. --- module/common/lang/de.php | 1 + module/common/lang/en.php | 1 + module/common/lang/fr.php | 1 + module/common/lang/zh-cn.php | 1 + module/custom/config.php | 4 +-- module/custom/lang/de.php | 52 +++++++++++++++++--------------- module/custom/lang/en.php | 52 +++++++++++++++++--------------- module/custom/lang/fr.php | 52 +++++++++++++++++--------------- module/custom/lang/zh-cn.php | 52 +++++++++++++++++--------------- module/custom/model.php | 16 ++++++++-- module/custom/view/mode.html.php | 8 ++--- 11 files changed, 132 insertions(+), 108 deletions(-) diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 139d0df14d..97c48c8108 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -188,6 +188,7 @@ $lang->team->common = 'Team'; $lang->user->common = 'User'; $lang->custom->common = 'Custom'; $lang->custom->mode = 'Mode'; +$lang->custom->flow = 'Concept'; $lang->extension->common = 'Extension'; $lang->company->common = 'Company'; $lang->dept->common = 'Dept'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 1eedb95f60..803cdee1bf 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -188,6 +188,7 @@ $lang->team->common = 'Team'; $lang->user->common = 'User'; $lang->custom->common = 'Custom'; $lang->custom->mode = 'Mode'; +$lang->custom->flow = 'Concept'; $lang->extension->common = 'Extension'; $lang->company->common = 'Company'; $lang->dept->common = 'Dept'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 985b8b6d92..c4ac3eea70 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -188,6 +188,7 @@ $lang->team->common = 'Team'; $lang->user->common = 'User'; $lang->custom->common = 'Custom'; $lang->custom->mode = 'Mode'; +$lang->custom->flow = 'Concept'; $lang->extension->common = 'Extension'; $lang->company->common = 'Company'; $lang->dept->common = 'Dept'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index e6a1814f28..21765b508e 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -188,6 +188,7 @@ $lang->team->common = '团队'; $lang->user->common = '用户'; $lang->custom->common = '自定义'; $lang->custom->mode = '模式'; +$lang->custom->flow = '流程设置'; $lang->extension->common = '插件'; $lang->company->common = '公司'; $lang->dept->common = '部门'; diff --git a/module/custom/config.php b/module/custom/config.php index d13809c919..dca615e25c 100644 --- a/module/custom/config.php +++ b/module/custom/config.php @@ -22,8 +22,8 @@ $config->custom->requiredModules[35] = 'execution'; $config->custom->requiredModules[40] = 'task'; $config->custom->requiredModules[45] = 'build'; -$config->custom->allFeatures = array('program', 'productRR', 'productUR', 'productLine', 'projectScrum', 'projectWaterfall', 'projectKanban', 'execution', 'qa', 'devops', 'kanban', 'doc', 'report', 'system', 'admin', 'vision'); -$config->custom->dataFeatures = array('productUR', 'waterfall'); +$config->custom->allFeatures = array('program', 'productRR', 'productUR', 'productLine', 'projectScrum', 'projectWaterfall', 'projectKanban', 'projectAgileplus', 'projectWaterfallplus', 'execution', 'qa', 'devops', 'kanban', 'doc', 'report', 'system', 'admin', 'vision'); +$config->custom->dataFeatures = array('productUR', 'waterfall', 'waterfallplus'); $config->custom->scrumFeatures = array(); $config->custom->requiredModules[50] = 'bug'; diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index a60abfa439..b3140f2c89 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -8,7 +8,6 @@ $lang->custom->set = 'Customize'; $lang->custom->restore = 'Reset to Default'; $lang->custom->key = 'Key'; $lang->custom->value = 'Value'; -$lang->custom->flow = 'Concept'; $lang->custom->working = 'WorkStyle'; $lang->custom->select = 'Select Concept'; $lang->custom->branch = 'Multi Branch'; @@ -252,31 +251,34 @@ $lang->custom->modeList['ALM'] = 'ALM Mode'; $lang->custom->modeIntroductionList['light'] = 'Provides the core function of project management, suitable for small R&D teams'; $lang->custom->modeIntroductionList['ALM'] = 'The concept is more complete and rigorous, and the function is more abundant. It is suitable for medium and large R&D teams'; -$lang->custom->features['program'] = 'Program'; -$lang->custom->features['productRR'] = 'Product - R&D Requirements'; -$lang->custom->features['productUR'] = 'Product - User Requirements'; -$lang->custom->features['productLine'] = 'Product - Product Line'; -$lang->custom->features['projectScrum'] = 'Project - Scrum Model'; -$lang->custom->features['projectWaterfall'] = 'Project - Waterfall Model'; -$lang->custom->features['projectKanban'] = 'Project - Kanban Model'; -$lang->custom->features['execution'] = 'Execution'; -$lang->custom->features['qa'] = 'QA'; -$lang->custom->features['devops'] = 'DevOps'; -$lang->custom->features['kanban'] = 'Kanban'; -$lang->custom->features['doc'] = 'Doc'; -$lang->custom->features['report'] = 'Statistics'; -$lang->custom->features['system'] = 'System'; -$lang->custom->features['assetlib'] = 'Asset Lib'; -$lang->custom->features['oa'] = 'Attend'; -$lang->custom->features['ops'] = 'Deploy'; -$lang->custom->features['feedback'] = 'Feedback'; -$lang->custom->features['traincourse'] = 'Academy'; -$lang->custom->features['workflow'] = 'Workflow'; -$lang->custom->features['admin'] = 'Admin'; -$lang->custom->features['vision'] = 'Full Feature Interface, Operation Management Interface'; +$lang->custom->features['program'] = 'Program'; +$lang->custom->features['productRR'] = $lang->productCommon . ' - R&D Requirements'; +$lang->custom->features['productUR'] = $lang->productCommon . ' - User Requirements'; +$lang->custom->features['productLine'] = $lang->productCommon . ' - Product Line'; +$lang->custom->features['projectScrum'] = $lang->projectCommon . ' - Scrum Model'; +$lang->custom->features['projectWaterfall'] = $lang->projectCommon . ' - Waterfall Model'; +$lang->custom->features['projectKanban'] = $lang->projectCommon . ' - Kanban Model'; +$lang->custom->features['projectAgileplus'] = $lang->projectCommon . ' - Agile + Model'; +$lang->custom->features['projectWaterfallplus'] = $lang->projectCommon . ' - Waterfall + Model'; +$lang->custom->features['execution'] = 'Execution'; +$lang->custom->features['qa'] = 'QA'; +$lang->custom->features['devops'] = 'DevOps'; +$lang->custom->features['kanban'] = 'Kanban'; +$lang->custom->features['doc'] = 'Doc'; +$lang->custom->features['report'] = 'Statistics'; +$lang->custom->features['system'] = 'System'; +$lang->custom->features['assetlib'] = 'Asset Lib'; +$lang->custom->features['oa'] = 'Attend'; +$lang->custom->features['ops'] = 'Deploy'; +$lang->custom->features['feedback'] = 'Feedback'; +$lang->custom->features['traincourse'] = 'Academy'; +$lang->custom->features['workflow'] = 'Workflow'; +$lang->custom->features['admin'] = 'Admin'; +$lang->custom->features['vision'] = 'Full Feature Interface, Operation Management Interface'; -$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; -$lang->custom->needClosedFunctions['URStory'] = 'User Story'; +$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; +$lang->custom->needClosedFunctions['waterfallplus'] = 'Waterfall +'; +$lang->custom->needClosedFunctions['URStory'] = 'User Story'; if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = 'Assetlib'; $lang->custom->scoreStatus[1] = 'On'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 8c29df5c94..8f2e139a8d 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -8,7 +8,6 @@ $lang->custom->set = 'Customize'; $lang->custom->restore = 'Reset'; $lang->custom->key = 'Key'; $lang->custom->value = 'Value'; -$lang->custom->flow = 'Concept'; $lang->custom->working = 'Mode'; $lang->custom->select = 'Select Concept'; $lang->custom->branch = 'Multi-Branch'; @@ -252,31 +251,34 @@ $lang->custom->modeList['ALM'] = 'ALM Mode'; $lang->custom->modeIntroductionList['light'] = 'Provides the core function of project management, suitable for small R&D teams'; $lang->custom->modeIntroductionList['ALM'] = 'The concept is more complete and rigorous, and the function is more abundant. It is suitable for medium and large R&D teams'; -$lang->custom->features['program'] = 'Program'; -$lang->custom->features['productRR'] = 'Product - R&D Requirements'; -$lang->custom->features['productUR'] = 'Product - User Requirements'; -$lang->custom->features['productLine'] = 'Product - Product Line'; -$lang->custom->features['projectScrum'] = 'Project - Scrum Model'; -$lang->custom->features['projectWaterfall'] = 'Project - Waterfall Model'; -$lang->custom->features['projectKanban'] = 'Project - Kanban Model'; -$lang->custom->features['execution'] = 'Execution'; -$lang->custom->features['qa'] = 'QA'; -$lang->custom->features['devops'] = 'DevOps'; -$lang->custom->features['kanban'] = 'Kanban'; -$lang->custom->features['doc'] = 'Doc'; -$lang->custom->features['report'] = 'Statistics'; -$lang->custom->features['system'] = 'System'; -$lang->custom->features['assetlib'] = 'Asset Lib'; -$lang->custom->features['oa'] = 'Attend'; -$lang->custom->features['ops'] = 'Deploy'; -$lang->custom->features['feedback'] = 'Feedback'; -$lang->custom->features['traincourse'] = 'Academy'; -$lang->custom->features['workflow'] = 'Workflow'; -$lang->custom->features['admin'] = 'Admin'; -$lang->custom->features['vision'] = 'Full Feature Interface, Operation Management Interface'; +$lang->custom->features['program'] = 'Program'; +$lang->custom->features['productRR'] = $lang->productCommon . ' - R&D Requirements'; +$lang->custom->features['productUR'] = $lang->productCommon . ' - User Requirements'; +$lang->custom->features['productLine'] = $lang->productCommon . ' - Product Line'; +$lang->custom->features['projectScrum'] = $lang->projectCommon . ' - Scrum Model'; +$lang->custom->features['projectWaterfall'] = $lang->projectCommon . ' - Waterfall Model'; +$lang->custom->features['projectKanban'] = $lang->projectCommon . ' - Kanban Model'; +$lang->custom->features['projectAgileplus'] = $lang->projectCommon . ' - Agile + Model'; +$lang->custom->features['projectWaterfallplus'] = $lang->projectCommon . ' - Waterfall + Model'; +$lang->custom->features['execution'] = 'Execution'; +$lang->custom->features['qa'] = 'QA'; +$lang->custom->features['devops'] = 'DevOps'; +$lang->custom->features['kanban'] = 'Kanban'; +$lang->custom->features['doc'] = 'Doc'; +$lang->custom->features['report'] = 'Statistics'; +$lang->custom->features['system'] = 'System'; +$lang->custom->features['assetlib'] = 'Asset Lib'; +$lang->custom->features['oa'] = 'Attend'; +$lang->custom->features['ops'] = 'Deploy'; +$lang->custom->features['feedback'] = 'Feedback'; +$lang->custom->features['traincourse'] = 'Academy'; +$lang->custom->features['workflow'] = 'Workflow'; +$lang->custom->features['admin'] = 'Admin'; +$lang->custom->features['vision'] = 'Full Feature Interface, Operation Management Interface'; -$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; -$lang->custom->needClosedFunctions['URStory'] = 'User Story'; +$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; +$lang->custom->needClosedFunctions['waterfallplus'] = 'Waterfall +'; +$lang->custom->needClosedFunctions['URStory'] = 'User Story'; if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = 'Assetlib'; $lang->custom->scoreStatus[1] = 'On'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 609cad69a4..2e43227781 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -8,7 +8,6 @@ $lang->custom->set = 'Personnaliser'; $lang->custom->restore = 'Réinitialiser'; $lang->custom->key = 'Clé'; $lang->custom->value = 'Valeur'; -$lang->custom->flow = 'Concept'; $lang->custom->working = 'Mode'; $lang->custom->select = 'Choix du Concept'; $lang->custom->branch = 'Multi-Branches'; @@ -252,31 +251,34 @@ $lang->custom->modeList['ALM'] = 'ALM Mode'; $lang->custom->modeIntroductionList['light'] = 'Provides the core function of project management, suitable for small R&D teams'; $lang->custom->modeIntroductionList['ALM'] = 'The concept is more complete and rigorous, and the function is more abundant. It is suitable for medium and large R&D teams'; -$lang->custom->features['program'] = 'Program'; -$lang->custom->features['productRR'] = 'Product - R&D Requirements'; -$lang->custom->features['productUR'] = 'Product - User Requirements'; -$lang->custom->features['productLine'] = 'Product - Product Line'; -$lang->custom->features['projectScrum'] = 'Project - Scrum Model'; -$lang->custom->features['projectWaterfall'] = 'Project - Waterfall Model'; -$lang->custom->features['projectKanban'] = 'Project - Kanban Model'; -$lang->custom->features['execution'] = 'Execution'; -$lang->custom->features['qa'] = 'QA'; -$lang->custom->features['devops'] = 'DevOps'; -$lang->custom->features['kanban'] = 'Kanban'; -$lang->custom->features['doc'] = 'Doc'; -$lang->custom->features['report'] = 'Statistics'; -$lang->custom->features['system'] = 'System'; -$lang->custom->features['assetlib'] = 'Asset Lib'; -$lang->custom->features['oa'] = 'Attend'; -$lang->custom->features['ops'] = 'Deploy'; -$lang->custom->features['feedback'] = 'Feedback'; -$lang->custom->features['traincourse'] = 'Academy'; -$lang->custom->features['workflow'] = 'Workflow'; -$lang->custom->features['admin'] = 'Admin'; -$lang->custom->features['vision'] = 'Full Feature Interface, Operation Management Interface'; +$lang->custom->features['program'] = 'Program'; +$lang->custom->features['productRR'] = $lang->productCommon . ' - R&D Requirements'; +$lang->custom->features['productUR'] = $lang->productCommon . ' - User Requirements'; +$lang->custom->features['productLine'] = $lang->productCommon . ' - Product Line'; +$lang->custom->features['projectScrum'] = $lang->projectCommon . ' - Scrum Model'; +$lang->custom->features['projectWaterfall'] = $lang->projectCommon . ' - Waterfall Model'; +$lang->custom->features['projectKanban'] = $lang->projectCommon . ' - Kanban Model'; +$lang->custom->features['projectAgileplus'] = $lang->projectCommon . ' - Agile + Model'; +$lang->custom->features['projectWaterfallplus'] = $lang->projectCommon . ' - Waterfall + Model'; +$lang->custom->features['execution'] = 'Execution'; +$lang->custom->features['qa'] = 'QA'; +$lang->custom->features['devops'] = 'DevOps'; +$lang->custom->features['kanban'] = 'Kanban'; +$lang->custom->features['doc'] = 'Doc'; +$lang->custom->features['report'] = 'Statistics'; +$lang->custom->features['system'] = 'System'; +$lang->custom->features['assetlib'] = 'Asset Lib'; +$lang->custom->features['oa'] = 'Attend'; +$lang->custom->features['ops'] = 'Deploy'; +$lang->custom->features['feedback'] = 'Feedback'; +$lang->custom->features['traincourse'] = 'Academy'; +$lang->custom->features['workflow'] = 'Workflow'; +$lang->custom->features['admin'] = 'Admin'; +$lang->custom->features['vision'] = 'Full Feature Interface, Operation Management Interface'; -$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; -$lang->custom->needClosedFunctions['URStory'] = 'User Story'; +$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall'; +$lang->custom->needClosedFunctions['waterfallplus'] = 'Waterfall +'; +$lang->custom->needClosedFunctions['URStory'] = 'User Story'; if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = 'Assetlib'; $lang->custom->scoreStatus[1] = 'On'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index ae60c824fb..8ed08ff52c 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -8,7 +8,6 @@ $lang->custom->set = '自定义配置'; $lang->custom->restore = '恢复默认'; $lang->custom->key = '键'; $lang->custom->value = '值'; -$lang->custom->flow = '流程设置'; $lang->custom->working = '工作方式'; $lang->custom->select = '请选择流程:'; $lang->custom->branch = '多分支'; @@ -252,31 +251,34 @@ $lang->custom->modeList['ALM'] = '全生命周期管理模式'; $lang->custom->modeIntroductionList['light'] = '提供了项目管理的核心功能,适用于小型研发团队'; $lang->custom->modeIntroductionList['ALM'] = '概念更加完整、严谨,功能更加丰富,适用于中大型研发团队'; -$lang->custom->features['program'] = '项目集'; -$lang->custom->features['productRR'] = '产品-研发需求'; -$lang->custom->features['productUR'] = '产品-用户需求'; -$lang->custom->features['productLine'] = '产品-产品线'; -$lang->custom->features['projectScrum'] = '项目-敏捷模型'; -$lang->custom->features['projectWaterfall'] = '项目-瀑布模型'; -$lang->custom->features['projectKanban'] = '项目-看板模型'; -$lang->custom->features['execution'] = '执行'; -$lang->custom->features['qa'] = '测试'; -$lang->custom->features['devops'] = 'DevOps'; -$lang->custom->features['kanban'] = '看板'; -$lang->custom->features['doc'] = '文档'; -$lang->custom->features['report'] = '统计'; -$lang->custom->features['system'] = '组织'; -$lang->custom->features['assetlib'] = '资产库'; -$lang->custom->features['oa'] = '办公'; -$lang->custom->features['ops'] = '运维'; -$lang->custom->features['feedback'] = '反馈'; -$lang->custom->features['traincourse'] = '学堂'; -$lang->custom->features['workflow'] = '工作流'; -$lang->custom->features['admin'] = '后台'; -$lang->custom->features['vision'] = '研发综合界面、运营管理界面'; +$lang->custom->features['program'] = '项目集'; +$lang->custom->features['productRR'] = '产品-研发需求'; +$lang->custom->features['productUR'] = '产品-用户需求'; +$lang->custom->features['productLine'] = '产品-产品线'; +$lang->custom->features['projectScrum'] = '项目-敏捷模型'; +$lang->custom->features['projectWaterfall'] = '项目-瀑布模型'; +$lang->custom->features['projectKanban'] = '项目-看板模型'; +$lang->custom->features['projectAgileplus'] = '项目-融合敏捷模型'; +$lang->custom->features['projectWaterfallplus'] = '项目-融合瀑布模型'; +$lang->custom->features['execution'] = '执行'; +$lang->custom->features['qa'] = '测试'; +$lang->custom->features['devops'] = 'DevOps'; +$lang->custom->features['kanban'] = '看板'; +$lang->custom->features['doc'] = '文档'; +$lang->custom->features['report'] = '统计'; +$lang->custom->features['system'] = '组织'; +$lang->custom->features['assetlib'] = '资产库'; +$lang->custom->features['oa'] = '办公'; +$lang->custom->features['ops'] = '运维'; +$lang->custom->features['feedback'] = '反馈'; +$lang->custom->features['traincourse'] = '学堂'; +$lang->custom->features['workflow'] = '工作流'; +$lang->custom->features['admin'] = '后台'; +$lang->custom->features['vision'] = '研发综合界面、运营管理界面'; -$lang->custom->needClosedFunctions['waterfall'] = '瀑布项目'; -$lang->custom->needClosedFunctions['URStory'] = '用户需求'; +$lang->custom->needClosedFunctions['waterfall'] = '瀑布项目'; +$lang->custom->needClosedFunctions['waterfallplus'] = '融合瀑布项目'; +$lang->custom->needClosedFunctions['URStory'] = '用户需求'; if($config->edition == 'max') $lang->custom->needClosedFunctions['assetLib'] = '资产库'; $lang->custom->scoreStatus[1] = '开启'; diff --git a/module/custom/model.php b/module/custom/model.php index 92376c196d..a497df3e59 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -840,7 +840,7 @@ class customModel extends model if(!isset($disabledFeatures['scrum'])) $disabledFeatures['scrum'] = array(); $disabledFeatures['scrum'][] = $feature; } - elseif($feature == 'waterfall') + elseif(in_array($feature, array('waterfall', 'waterfallplus'))) { $disabledFeatures[] = 'project' . ucfirst($feature); } @@ -988,6 +988,17 @@ class customModel extends model return $this->dao->select('*')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->eq('0')->count(); } + /** + * Check for waterfallplus project data. + * + * @access public + * @return int + */ + public function hasWaterfallplusData() + { + return $this->dao->select('*')->from(TABLE_PROJECT)->where('model')->eq('waterfallplus')->andWhere('deleted')->eq('0')->count(); + } + /** * Check for assetlib data. * @@ -1124,8 +1135,9 @@ class customModel extends model $disabledFeatures = $disabledFeatures . ',' . $closedFeatures; $hasWaterfall = strpos(",{$disabledFeatures},", ',waterfall,') === false; + $hasWaterfallPlus = strpos(",{$disabledFeatures},", ',waterfallplus,') === false; $hasScrumMeasrecord = strpos(",{$disabledFeatures},", ',scrumMeasrecord,') === false; - $hasWaterfallMeasrecord = (strpos(",{$disabledFeatures},", ',waterfallMeasrecord,') === false and $hasWaterfall); + $hasWaterfallMeasrecord = (strpos(",{$disabledFeatures},", ',waterfallMeasrecord,') === false and ($hasWaterfall or $hasWaterfallPlus)); $cronStatus = 'normal'; if(!$hasScrumMeasrecord and !$hasWaterfallMeasrecord) $cronStatus = 'stop'; diff --git a/module/custom/view/mode.html.php b/module/custom/view/mode.html.php index 7378168d3a..5376929d50 100644 --- a/module/custom/view/mode.html.php +++ b/module/custom/view/mode.html.php @@ -36,9 +36,9 @@ custom->modeIntroductionList['ALM'];?> - + - lang->custom->scrum->common, implode($lang->comma, $disabledScrumFeatures)) : $this->lang->custom->features[$feature];?> + lang->custom->scrum->common, implode($lang->comma, $disabledScrumFeatures)) : $this->lang->custom->features[$feature];?> @@ -46,9 +46,9 @@ custom->allFeatures as $feature):?> - + - lang->custom->scrum->common, implode($lang->comma, $enabledScrumFeatures)) : $this->lang->custom->features[$feature];?> + lang->custom->scrum->common, implode($lang->comma, $enabledScrumFeatures)) : $this->lang->custom->features[$feature];?> From 29e3eec34c346053e70f34cd67a8954e6f597a80 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Feb 2023 13:36:28 +0800 Subject: [PATCH 5/5] * Add case for custom module. --- test/class/custom.class.php | 21 +++++++++++++ test/model/custom/haswaterfallplusdata.php | 34 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 test/model/custom/haswaterfallplusdata.php diff --git a/test/class/custom.class.php b/test/class/custom.class.php index ed38ded606..8cdf495085 100644 --- a/test/class/custom.class.php +++ b/test/class/custom.class.php @@ -334,4 +334,25 @@ class customTest return $objects; } + + /** + * Check for waterfallplus project data.. + * + * @param string $param deleteproject + * @access public + * @return int + */ + public function hasWaterfallplusDataTest($param = '') + { + if($param == 'deleteproject') + { + global $tester; + $tester->dao->update(TABLE_PROJECT) + ->set('deleted')->eq(1) + ->where('type')->eq('project') + ->andWhere('model')->eq('waterfallplus') + ->exec(); + } + return $this->objectModel->hasWaterfallplusData(); + } } diff --git a/test/model/custom/haswaterfallplusdata.php b/test/model/custom/haswaterfallplusdata.php new file mode 100644 index 0000000000..de02c5d720 --- /dev/null +++ b/test/model/custom/haswaterfallplusdata.php @@ -0,0 +1,34 @@ +#!/usr/bin/env php +gen(5); +su('admin'); + +$project = zdTable('project'); +$project->id->range('1-3'); +$project->name->range('项目集1,融合瀑布项目1,瀑布项目1'); +$project->type->range('program,project{2}'); +$project->parent->range('0,1{2}'); +$project->status->range('wait'); +$project->model->range('[],waterfallplus,waterfall'); +$project->openedBy->range('admin,user1'); +$project->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD'); +$project->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$project->gen(3); + +/** + +title=测试projectModel->hasWaterfallplusData(); +cid=1 +pid=1 + +检查获取所有未删除的融合瀑布项目的数量 >> 1 +检查删除所有融合瀑布模型项目后,获取融合瀑布项目的数量 >> 0 + +*/ + +$customTester = new customTest(); +r($customTester->hasWaterfallplusDataTest()) && p() && e('1'); // 检查获取所有未删除的融合瀑布项目的数量 +r($customTester->hasWaterfallplusDataTest('deleteproject')) && p() && e('0'); // 检查删除所有融合瀑布模型项目后,获取融合瀑布项目的数量