diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 9b01e48ece..d03869eed7 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -230,6 +230,15 @@ $lang->my->menu->story = array('link' => 'Story|my|story|', 'subModul $lang->my->menu->myProject = "{$lang->projectCommon}|my|project|"; $lang->my->menu->dynamic = 'Dynamics|my|dynamic|'; +global $config; +if(!empty($config->URAndSR)) +{ + $urCommon = zget($lang, 'urCommon', "Requirement"); + $srCommon = zget($lang, 'srCommon', "Story"); + $lang->my->menu->requirement = array('link' => "{$urCommon}|my|requirement|", 'subModule' => 'story'); + $lang->my->menu->story = array('link' => "{$srCommon}|my|story|", 'subModule' => 'story'); +} + $lang->my->dividerMenu = ',program,requirement,dynamic,'; $lang->todo = new stdclass(); @@ -250,6 +259,12 @@ $lang->product->menu->branch = '@branch@|branch|manage|productID=%s'; $lang->product->menu->module = 'Module|tree|browse|productID=%s&view=story'; $lang->product->menu->view = array('link' => 'Overview|product|view|productID=%s', 'alias' => 'edit'); +if(!empty($config->URAndSR)) +{ + $lang->product->menu->requirement = array('link' => "{$urCommon}|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story'); + $lang->product->menu->story = array('link' => "{$srCommon}|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story'); +} + $lang->product->dividerMenu = ',plan,project,doc,'; $lang->productplan = new stdclass(); @@ -796,3 +811,86 @@ $lang->icons['confirmStoryChange'] = 'search'; $lang->icons['score'] = 'tint'; include (dirname(__FILE__) . '/menuOrder.php'); + +/* Waterfall menu. */ +$lang->menu->waterfall = new stdclass(); +$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}'); +$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan'); +$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,'); +$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,'); +$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}'); +$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,'); +$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}'; +$lang->menu->waterfall->ci = 'Code|repo|browse|'; +$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,'); +$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release'); +$lang->menu->waterfall->issue = 'Issue|issue|browse|'; +$lang->menu->waterfall->risk = 'Risk|risk|browse|'; +$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder'); + +/* Srcum menu. */ +$lang->menu->srcum = new stdclass(); +$lang->menu->srcum->programindex = array('link' => 'Index|program|index|program={PROGRAM}'); + +$lang->waterfall = new stdclass(); +$lang->waterfall->subMenu = new stdclass(); +$lang->waterfall->subMenu->list = new stdclass(); +$lang->waterfall->subMenu->list->workestimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'durationestimation,budget'); +$lang->waterfall->subMenu->list->program = 'Program|program|edit|'; + +$lang->waterfallproduct = new stdclass(); +$lang->workestimation = new stdclass(); +$lang->budget = new stdclass(); +$lang->programplan = new stdclass(); +$lang->review = new stdclass(); +$lang->weekly = new stdclass(); +$lang->milestone = new stdclass(); +$lang->design = new stdclass(); +$lang->auditplan = new stdclass(); +$lang->cm = new stdclass(); +$lang->nc = new stdclass(); +$lang->pssp = new stdclass(); +$lang->issue = new stdclass(); +$lang->risk = new stdclass(); +$lang->stakeholder = new stdclass(); +$lang->durationestimation = new stdclass(); + +$lang->workestimation->menu = new stdclass(); +$lang->budget->menu = new stdclass(); +$lang->programplan->menu = new stdclass(); +$lang->review->menu = new stdclass(); +$lang->weekly->menu = new stdclass(); +$lang->milestone->menu = new stdclass(); +$lang->waterfallproduct->menu = new stdclass(); +$lang->design->menu = new stdclass(); +$lang->auditplan->menu = new stdclass(); +$lang->cm->menu = new stdclass(); +$lang->pssp->menu = new stdclass(); +$lang->issue->menu = new stdclass(); +$lang->risk->menu = new stdclass(); +$lang->stakeholder->menu = new stdclass(); +$lang->durationestimation->menu = new stdclass(); + +$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROGRAM}'; +$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROGRAM}', 'subModule' => 'durationestimation'); +$lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget'); + +$lang->durationestimation->menu = $lang->workestimation->menu; +$lang->budget->menu = $lang->workestimation->menu; + +$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt'); +$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create'); + +$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan'); +$lang->waterfallproduct->menu->story = 'Story|product|browse|product={PRODUCT}'; +$lang->waterfallproduct->menu->track = 'Track|story|track|product={PRODUCT}'; + +if(!empty($config->URAndSR)) +{ + $lang->waterfallproduct->menu->requirement = array('link' => "{$urCommon}|product|browse|productID={PRODUCT}&branch=&browseType=unclosed¶m=0&storyType=requirement"); + $lang->waterfallproduct->menu->story = array('link' => "{$srCommon}|product|browse|productID={PRODUCT}"); +} + +$lang->nc->menu = $lang->auditplan->menu; + +$lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index de7b92c4df..a4bd1ce3bd 100755 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -143,7 +143,7 @@ $lang->system->menu->estimate = array('link' => '估算|custom|estimate|'); $lang->system->menu->stage = array('link' => '阶段|stage|browse|', 'subModule' => 'stage'); $lang->system->menu->subject = array('link' => '科目|subject|browse|'); $lang->system->menu->holiday = array('link' => '节假日|holiday|browse|'); -$lang->system->menu->custom = array('link' => '自定义|custom|plan|'); +$lang->system->menu->custom = array('link' => '自定义|custom|configurewaterfall|'); $lang->system->dividerMenu = ',auditcl,subject,'; if(isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') @@ -151,7 +151,7 @@ if(isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') $lang->system->menu = new stdclass(); $lang->system->menu->subject = array('link' => '科目|subject|browse|'); $lang->system->menu->holiday = array('link' => '节假日|holiday|browse|'); - $lang->system->menu->custom = array('link' => '自定义|custom|concept|'); + $lang->system->menu->custom = array('link' => '自定义|custom|configurescrum|'); $lang->mainNav->system = ' 组织|subject|browse|'; unset($lang->system->dividerMenu); @@ -225,11 +225,19 @@ $lang->my->menu->program = array('link' => '项目|my|program|'); $lang->my->menu->task = array('link' => '任务|my|task|', 'subModule' => 'task'); $lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug'); $lang->my->menu->testtask = array('link' => '测试|my|testtask|', 'subModule' => 'testcase,testtask', 'alias' => 'testcase'); -$lang->my->menu->requirement = array('link' => "用户需求|my|requirement|", 'subModule' => 'story'); -$lang->my->menu->story = array('link' => "软件需求|my|story|", 'subModule' => 'story'); +$lang->my->menu->story = array('link' => "需求|my|story|", 'subModule' => 'story'); $lang->my->menu->myProject = "{$lang->projectCommon}|my|project|"; $lang->my->menu->dynamic = '动态|my|dynamic|'; +global $config; +if(!empty($config->URAndSR)) +{ + $urCommon = zget($lang, 'urCommon', "用户需求"); + $srCommon = zget($lang, 'srCommon', "软件需求"); + $lang->my->menu->requirement = array('link' => "{$urCommon}|my|requirement|", 'subModule' => 'story'); + $lang->my->menu->story = array('link' => "{$srCommon}|my|story|", 'subModule' => 'story'); +} + $lang->my->dividerMenu = ',program,requirement,dynamic,'; $lang->todo = new stdclass(); @@ -250,6 +258,12 @@ $lang->product->menu->branch = '@branch@|branch|manage|productID=%s'; $lang->product->menu->module = '模块|tree|browse|productID=%s&view=story'; $lang->product->menu->view = array('link' => '概况|product|view|productID=%s', 'alias' => 'edit'); +if(!empty($config->URAndSR)) +{ + $lang->product->menu->requirement = array('link' => "{$urCommon}|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story'); + $lang->product->menu->story = array('link' => "{$srCommon}|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story'); +} + $lang->product->dividerMenu = ',project,doc,'; $lang->productplan = new stdclass(); @@ -804,7 +818,7 @@ $lang->menu->waterfall->programplan = array('link' => '计划|programplan|brows $lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,'); $lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,'); $lang->menu->waterfall->doc = array('link' => '文档|doc|index|program={PROGRAM}'); -$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement', 'subModule' => ',story,'); +$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,'); $lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}'; $lang->menu->waterfall->ci = '代码|repo|browse|'; $lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,'); @@ -867,10 +881,15 @@ $lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse| $lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create'); $lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan'); -$lang->waterfallproduct->menu->requirement = '用户需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement'; -$lang->waterfallproduct->menu->story = '软件需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=story'; +$lang->waterfallproduct->menu->story = '需求|product|browse|product={PRODUCT}'; $lang->waterfallproduct->menu->track = '跟踪矩阵|story|track|product={PRODUCT}'; +if(!empty($config->URAndSR)) +{ + $lang->waterfallproduct->menu->requirement = array('link' => "{$urCommon}|product|browse|productID={PRODUCT}&branch=&browseType=unclosed¶m=0&storyType=requirement"); + $lang->waterfallproduct->menu->story = array('link' => "{$srCommon}|product|browse|productID={PRODUCT}"); +} + $lang->nc->menu = $lang->auditplan->menu; $lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search'); diff --git a/module/custom/control.php b/module/custom/control.php index 6048904548..18b68033fb 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -386,12 +386,12 @@ class custom extends control } /** - * Display plan or not. + * Configure waterfall. * * @access public * @return void */ - public function plan() + public function configureWaterfall() { $this->lang->custom->menu = new stdclass(); $this->lang->navGroup->custom = 'system'; @@ -401,25 +401,26 @@ class custom extends control $data = fixer::input('post')->get(); $this->loadModel('setting')->setItem('system.custom.planStatus', $data->planStatus); + $this->custom->setURAndSR(); + if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); - $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('custom', 'plan'))); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('custom', 'configurewaterfall'))); } - $this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->custom->plan; + $this->view->title = $this->lang->custom->common; $this->view->position[] = $this->lang->custom->common; - $this->view->position[] = $this->lang->custom->plan; $this->view->status = zget($this->config->custom, 'planStatus', 0); $this->display(); } /** - * QC concept. + * Configure scrum. * * @access public * @return void */ - public function concept() + public function configureScrum() { $this->lang->custom->menu = new stdclass(); $this->lang->navGroup->custom = 'system'; @@ -427,14 +428,14 @@ class custom extends control if($_POST) { $this->custom->setConcept(); + $this->custom->setURAndSR(); - $this->app->loadLang('common'); - $locate = inlink('concept'); + $locate = inlink('configureScrum'); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate)); } - $this->view->title = $this->lang->custom->concept; - $this->view->position[] = $this->lang->custom->concept; + $this->view->title = $this->lang->custom->configureScrum; + $this->view->position[] = $this->lang->custom->configureScrum; $this->display(); } @@ -461,7 +462,7 @@ class custom extends control { setCookie("systemModel", 'scrum', $this->config->cookieLife, $this->config->webRoot, '', false, true); - die(js::locate($this->createLink('custom', 'concept'))); + die(js::locate($this->createLink('custom', 'configurescrum'))); } /** diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 5ec0bd1b90..897514221a 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -32,9 +32,9 @@ $lang->custom->region = '区间'; $lang->custom->tips = '提示语'; $lang->custom->setTips = '设置提示语'; $lang->custom->isRange = '是否目标控制范围'; -$lang->custom->plan = '排期'; -$lang->custom->planStatus = '是否启用排期'; -$lang->custom->concept = '概念'; +$lang->custom->configureScrum = '概念'; +$lang->custom->URStory = "用户需求"; +$lang->custom->SRStory = "软件需求"; $lang->custom->object['program'] = '项目'; $lang->custom->program->fields['unitList'] = '预算单位'; @@ -52,9 +52,6 @@ $lang->custom->tipProgressList['SV'] = '进度偏差率(SV%)'; $lang->custom->tipCostList['CPI'] = '项目成本绩效(CPI)'; $lang->custom->tipCostList['CV'] = '成本偏差率(CV%)'; -$lang->custom->planStatusList[0] = '否'; -$lang->custom->planStatusList[1] = '是'; - $lang->custom->tipRangeList[0] = '否'; $lang->custom->tipRangeList[1] = '是'; @@ -201,3 +198,17 @@ $lang->custom->conceptOptions->hourPoint = array(); $lang->custom->conceptOptions->hourPoint['1'] = '故事点'; $lang->custom->conceptOptions->hourPoint['2'] = '功能点'; $lang->custom->conceptOptions->hourPoint['3'] = '代码行'; + +$lang->custom->waterfall = new stdclass(); +$lang->custom->waterfall->plan = '1.是否启用排期?'; +$lang->custom->waterfall->URAndSR = '2.是否启用用户需求和软件需求概念?'; +$lang->custom->waterfall->URSRName = '3.用户需求和软件需求的概念定义?'; + +$lang->custom->waterfallOptions = new stdclass(); +$lang->custom->waterfallOptions->URAndSR = array(); +$lang->custom->waterfallOptions->URAndSR[0] = '否'; +$lang->custom->waterfallOptions->URAndSR[1] = '是'; + +$lang->custom->waterfallOptions->planStatus = array(); +$lang->custom->waterfallOptions->planStatus[0] = '否'; +$lang->custom->waterfallOptions->planStatus[1] = '是'; diff --git a/module/custom/model.php b/module/custom/model.php index 41612151ec..d2c2762ea8 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -550,14 +550,15 @@ class customModel extends model } /** - * Set qc concept. + * Set product and project concept. * * @access public * @return void */ public function setConcept() { - $this->loadModel('setting')->setItem('system.custom.productProject', $this->post->productProject); + $this->loadModel('setting'); + $this->setting->setItem('system.custom.productProject', $this->post->productProject); /* Change block title. */ $oldConfig = isset($this->config->custom->productProject) ? $this->config->custom->productProject : '0_0'; @@ -577,6 +578,27 @@ class customModel extends model } } + /** + * Set ur and sr concept. + * + * @access public + * @return void + */ + public function setURAndSR() + { + $data = fixer::input('post')->get(); + + $this->loadModel('setting')->setItem('system.custom.URAndSR', $data->URAndSR); + if($data->URAndSR) + { + $clientLang = $this->app->getClientLang(); + $URSRName = isset($this->config->custom->URSRName) ? json_decode($this->config->custom->URSRName, true) : array(); + $URSRName['urCommon'][$clientLang] = $data->urCommon[$clientLang]; + $URSRName['srCommon'][$clientLang] = $data->srCommon[$clientLang]; + $this->setting->setItem('system.custom.URSRName', json_encode($URSRName)); + } + } + /** * Set story or requirement. * diff --git a/module/custom/view/concept.html.php b/module/custom/view/concept.html.php deleted file mode 100644 index 343278cab8..0000000000 --- a/module/custom/view/concept.html.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @package ZenTaoPMS - * @version $Id: deny.html.php 4129 2013-01-18 01:58:14Z wwccss $ - */ -?> - - -
-
- -
-
- diff --git a/module/custom/view/plan.html.php b/module/custom/view/plan.html.php deleted file mode 100644 index 373c83c0e0..0000000000 --- a/module/custom/view/plan.html.php +++ /dev/null @@ -1,23 +0,0 @@ - - -
-
-
- - - - - - - - - -
custom->planStatus;?>custom->planStatusList, $status);?>
-
-
-
- diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 36fdbfb1a9..e0f315b926 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -90,6 +90,7 @@ $lang->resource->my->bug = 'bug'; $lang->resource->my->testTask = 'testTask'; $lang->resource->my->testCase = 'testCase'; $lang->resource->my->story = 'story'; +$lang->resource->my->requirement = 'requirement'; $lang->resource->my->program = 'program'; $lang->resource->my->project = 'myProject'; $lang->resource->my->profile = 'profile'; diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 65ec6194c9..d3541129ec 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass(); $lang->misc->feature->lastest = 'Latest Version'; $lang->misc->feature->detailed = 'Detail'; +$lang->misc->releaseDate['20.0'] = '2020-09-01'; $lang->misc->releaseDate['12.4.1'] = '2020-08-10'; $lang->misc->releaseDate['12.4.stable'] = '2020-07-28'; $lang->misc->releaseDate['12.3.3'] = '2020-07-02'; diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index 128a36e55b..4932617d10 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass(); $lang->misc->feature->lastest = '最新版本'; $lang->misc->feature->detailed = '详情'; +$lang->misc->releaseDate['20.0'] = '2020-09-01'; $lang->misc->releaseDate['12.4.1'] = '2020-08-10'; $lang->misc->releaseDate['12.4.stable'] = '2020-07-28'; $lang->misc->releaseDate['12.3.3'] = '2020-07-02'; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index dc9cbfb73d..20a5843086 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -22,7 +22,7 @@ js::set('unfoldStories', $unfoldStories); js::set('unfoldAll', $lang->project->treeLevel['all']); js::set('foldAll', $lang->project->treeLevel['root']); js::set('storyType', $storyType); -if($program->template == 'waterfall') $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement; +$lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement; ?>