diff --git a/config/zentaopms.php b/config/zentaopms.php index ff9bafc479..408f4ee482 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -224,6 +224,7 @@ $config->objectTables['module'] = TABLE_MODULE; $config->objectTables['caselib'] = TABLE_TESTSUITE; $config->objectTables['entry'] = TABLE_ENTRY; $config->objectTables['webhook'] = TABLE_WEBHOOK; +$config->objectTables['risk'] = TABLE_RISK; /* Program privs.*/ $config->programPriv = new stdclass(); diff --git a/db/update20.0.sql b/db/update20.0.sql index 41cc05cf04..53b8300f22 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -292,4 +292,4 @@ ALTER TABLE `zt_project` ADD `grade` tinyint unsigned NOT NULL AFTER `path`; INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system','custom','','URAndSR','1'),('system','custom','','URSRName','{\"urCommon\":{\"zh-cn\":\"\\u7528\\u6237\\u9700\\u6c42\"},\"srCommon\":{\"zh-cn\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\"}}'),('system','custom','','storyPoint','1'); ALTER TABLE `zt_block` ADD `type` char(30) NOT NULL AFTER `module`; -ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `account_module_order_type`; +ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `accountModuleOrder`; diff --git a/module/action/config.php b/module/action/config.php index 7e9c1a3796..9973386a59 100755 --- a/module/action/config.php +++ b/module/action/config.php @@ -22,6 +22,7 @@ $config->action->objectNameFields['caselib'] = 'name'; $config->action->objectNameFields['testreport'] = 'title'; $config->action->objectNameFields['entry'] = 'name'; $config->action->objectNameFields['webhook'] = 'name'; +$config->action->objectNameFields['risk'] = 'name'; $config->action->commonImgSize = 870; diff --git a/module/block/control.php b/module/block/control.php index 824dd7677f..10d0aca623 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1178,7 +1178,7 @@ class block extends control $begin = $program->begin; $today = helper::today(); - $end = date('Y-m-d', strtotime("$today + 7 days")); + $end = date('Y-m-d', strtotime($today)); $projects = $this->project->getProjectsByProgram($program); $projectIdList = array_keys($projects); @@ -1188,14 +1188,15 @@ class block extends control $charts['AC'] = '['; $i = 1; $start = $begin; + $longProgram = helper::diffDate($today, $begin) / 7 > 10; while($start < $end) { - $charts['labels'][] = $this->lang->milestone->chart->time . $i . $this->lang->milestone->chart->week; - $sunday = $this->weekly->getThisSunday($start); - $charts['PV'] .= $this->milestone->getPV($projectIdList, $begin, $sunday) . ','; - $charts['EV'] .= $this->milestone->getEV($projectIdList, $begin, $sunday) . ','; - $charts['AC'] .= $this->milestone->getAC($projectIdList, $begin, $sunday) . ','; - $start = date('Y-m-d', strtotime("$start + 7 days")); + $charts['labels'][] = $longProgram ? $this->lang->milestone->chart->time . $i . $this->lang->milestone->chart->month : $this->lang->milestone->chart->time . $i . $this->lang->milestone->chart->week; + $stageEnd = $longProgram ? date('Y-m-t', strtotime($start)) : $this->weekly->getThisSunday($start); + $charts['PV'] .= $this->milestone->getPV($projectIdList, $begin, $stageEnd) . ','; + $charts['EV'] .= $this->milestone->getEV($projectIdList, $begin, $stageEnd) . ','; + $charts['AC'] .= $this->milestone->getAC($projectIdList, $begin, $stageEnd) . ','; + $start = $longProgram ? date('Y-m-d', strtotime("$start + 1 month")) : date('Y-m-d', strtotime("$start + 7 days")); $i ++; } @@ -1398,13 +1399,14 @@ class block extends control */ public function printAssignToMeBlock($longBlock = true) { - if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; - if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; - if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true; - if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true; + if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; + if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; + if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true; + if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true; $params = $this->get->param; $params = json_decode(base64_decode($params)); + $count = array(); if(isset($hasViewPriv['todo'])) { @@ -1428,6 +1430,7 @@ class block extends control $todo->begin = date::formatTime($todo->begin); $todo->end = date::formatTime($todo->end); } + $count['todo'] = count($todos); $this->view->todos = $todos; } if(isset($hasViewPriv['task'])) @@ -1441,6 +1444,7 @@ class block extends control if(isset($params->taskNum)) $stmt->limit($params->taskNum); $tasks = $stmt->fetchAll(); + $count['task'] = count($tasks); $this->view->tasks = $tasks; } if(isset($hasViewPriv['bug'])) @@ -1454,6 +1458,7 @@ class block extends control if(isset($params->bugNum)) $stmt->limit($params->bugNum); $bugs = $stmt->fetchAll(); + $count['bug'] = count($bugs); $this->view->bugs = $bugs; } if(isset($hasViewPriv['risk'])) @@ -1467,11 +1472,13 @@ class block extends control if(isset($params->riskNum)) $stmt->limit($params->riskNum); $risks = $stmt->fetchAll(); + $count['risk'] = count($risks); $this->view->risks = $risks; } $this->view->selfCall = $this->selfCall; $this->view->hasViewPriv = $hasViewPriv; + $this->view->count = $count; $this->view->longBlock = $longBlock; $this->display(); } @@ -1491,7 +1498,7 @@ class block extends control { $this->loadModel('project'); - $num = isset($this->params->num) ? (int)$this->params->num : 15; + $num = isset($this->params->num) ? (int)$this->params->num : 15; /* Get projects. */ $this->view->programs = $this->loadModel('program')->getUserPrograms('all', 'id_desc', $num); diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 275209bbbf..a51e6543f9 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -32,9 +32,11 @@ $lang->block->lblNum = 'Number'; $lang->block->lblHtml = 'HTML'; $lang->block->dynamic = 'Dynamics'; $lang->block->assignToMe = 'AssignedToMe'; +$lang->block->done = 'Done'; $lang->block->lblFlowchart = 'Flowchart'; $lang->block->welcome = 'Welcome'; $lang->block->lblTesttask = 'Test Request Detail'; +$lang->block->contribute = 'Personal Contribution'; $lang->block->leftToday = 'Remained Work'; $lang->block->myTask = 'My Tasks'; @@ -52,6 +54,9 @@ $lang->block->resolvedBugs = 'The Number Of Bugs Resolved'; $lang->block->openedTestcases = 'The Number Of Test Case Created'; $lang->block->cmmi = 'CMMI 3'; $lang->block->scrum = 'Scrum+'; +$lang->block->allProject = 'All ' . $lang->projectCommon; +$lang->block->doingProject = 'Doning ' . $lang->projectCommon; +$lang->block->finishProject = 'Finish ' . $lang->projectCommon; $lang->block->params = new stdclass(); $lang->block->params->name = 'Name'; @@ -71,6 +76,85 @@ $lang->block->nbsp = ' '; $lang->block->hidden = 'Hide'; $lang->block->dynamicInfo = "%s %s %s %s %s"; +$lang->block->productName = $lang->productCommon . ' Name'; +$lang->block->totalStory = 'The Total ' . $lang->storyCommon; +$lang->block->totalBug = 'The Total Bug'; +$lang->block->totalRelease = 'Release The Number'; + +$lang->block->default['cmmi']['program']['1']['title'] = $lang->projectCommon . 'Weekly'; +$lang->block->default['cmmi']['program']['1']['block'] = 'Pmmireport'; +$lang->block->default['cmmi']['program']['1']['source'] = 'Program'; +$lang->block->default['cmmi']['program']['1']['grid'] = 8; + +$lang->block->default['cmmi']['program']['2']['title'] = 'Estimate'; +$lang->block->default['cmmi']['program']['2']['block'] = 'cmmiestimate'; +$lang->block->default['cmmi']['program']['2']['source'] = 'program'; +$lang->block->default['cmmi']['program']['2']['grid'] = 4; + +$lang->block->default['cmmi']['program']['3']['title'] = 'Plan Gantt Chart'; +$lang->block->default['cmmi']['program']['3']['block'] = 'cmmigantt'; +$lang->block->default['cmmi']['program']['3']['source'] = 'program'; +$lang->block->default['cmmi']['program']['3']['grid'] = 8; + +$lang->block->default['cmmi']['program']['4']['title'] = 'Progress Chart'; +$lang->block->default['cmmi']['program']['4']['block'] = 'cmmiprogress'; +$lang->block->default['cmmi']['program']['4']['grid'] = 4; + +$lang->block->default['cmmi']['program']['5']['title'] = 'Program Issue'; +$lang->block->default['cmmi']['program']['5']['block'] = 'cmmiissue'; +$lang->block->default['cmmi']['program']['5']['source'] = 'program'; +$lang->block->default['cmmi']['program']['5']['grid'] = 8; + +$lang->block->default['cmmi']['program']['5']['params']['type'] = 'all'; +$lang->block->default['cmmi']['program']['5']['params']['num'] = '15'; +$lang->block->default['cmmi']['program']['5']['params']['orderBy'] = 'id_desc'; + +$lang->block->default['cmmi']['program']['6']['title'] = 'Dynamic'; +$lang->block->default['cmmi']['program']['6']['block'] = 'dynamic'; +$lang->block->default['cmmi']['program']['6']['grid'] = 4; +$lang->block->default['cmmi']['program']['6']['source'] = ''; + +$lang->block->default['cmmi']['program']['7']['title'] = $lang->projectCommon . 'Risk'; +$lang->block->default['cmmi']['program']['7']['block'] = 'cmmirisk'; +$lang->block->default['cmmi']['program']['7']['source'] = 'program'; +$lang->block->default['cmmi']['program']['7']['grid'] = 8; + +$lang->block->default['cmmi']['program']['7']['params']['type'] = 'all'; +$lang->block->default['cmmi']['program']['7']['params']['num'] = '15'; +$lang->block->default['cmmi']['program']['7']['params']['orderBy'] = 'id_desc'; + +$lang->block->default['scrum']['program']['1']['title'] = $lang->projectCommon . ' Overall'; +$lang->block->default['scrum']['program']['1']['block'] = 'scrumoverall'; +$lang->block->default['scrum']['program']['1']['grid'] = 8; + +$lang->block->default['scrum']['program']['2']['title'] = $lang->projectCommon . ' List'; +$lang->block->default['scrum']['program']['2']['block'] = 'scrumlist'; +$lang->block->default['scrum']['program']['2']['grid'] = 8; + +$lang->block->default['scrum']['program']['3']['title'] = $lang->productCommon . ' Road Map'; +$lang->block->default['scrum']['program']['3']['block'] = 'scrumroadmap'; +$lang->block->default['scrum']['program']['3']['grid'] = 8; + +$lang->block->default['scrum']['program']['4']['title'] = 'Test Version'; +$lang->block->default['scrum']['program']['4']['block'] = 'scrumtest'; +$lang->block->default['scrum']['program']['4']['grid'] = 8; + +$lang->block->default['scrum']['program']['4']['params']['type'] = 'all'; +$lang->block->default['scrum']['program']['4']['params']['num'] = '15'; +$lang->block->default['scrum']['program']['4']['params']['orderBy'] = 'id_desc'; + +$lang->block->default['scrum']['program']['5']['title'] = $lang->productCommon . ' Overview'; +$lang->block->default['scrum']['program']['5']['block'] = 'scrumproduct'; +$lang->block->default['scrum']['program']['5']['grid'] = 4; + +$lang->block->default['scrum']['program']['6']['title'] = $lang->projectCommon . ' Overview'; +$lang->block->default['scrum']['program']['6']['block'] = 'scrumproject'; +$lang->block->default['scrum']['program']['6']['grid'] = 4; + +$lang->block->default['scrum']['program']['7']['title'] = 'Dynamic'; +$lang->block->default['scrum']['program']['7']['block'] = 'scrumdynamic'; +$lang->block->default['scrum']['program']['7']['grid'] = 4; + $lang->block->default['product']['1']['title'] = $lang->productCommon . ' Report'; $lang->block->default['product']['1']['block'] = 'statistic'; $lang->block->default['product']['1']['grid'] = 8; @@ -167,73 +251,47 @@ $lang->block->default['full']['my']['2']['title'] = 'Dynamics'; $lang->block->default['full']['my']['2']['block'] = 'dynamic'; $lang->block->default['full']['my']['2']['grid'] = 4; $lang->block->default['full']['my']['2']['source'] = ''; -$lang->block->default['full']['my']['3']['title'] = 'Flowchart'; -$lang->block->default['full']['my']['3']['block'] = 'flowchart'; -$lang->block->default['full']['my']['3']['grid'] = 8; -$lang->block->default['full']['my']['3']['source'] = ''; -$lang->block->default['full']['my']['4']['title'] = 'My Todos'; -$lang->block->default['full']['my']['4']['block'] = 'list'; -$lang->block->default['full']['my']['4']['grid'] = 4; -$lang->block->default['full']['my']['4']['source'] = 'todo'; -$lang->block->default['full']['my']['4']['params']['num'] = '20'; -$lang->block->default['full']['my']['5'] = $lang->block->default['project']['1']; -$lang->block->default['full']['my']['5']['source'] = 'project'; -$lang->block->default['full']['my']['6'] = $lang->block->default['project']['2']; -$lang->block->default['full']['my']['6']['source'] = 'project'; -$lang->block->default['full']['my']['7'] = $lang->block->default['product']['1']; -$lang->block->default['full']['my']['7']['source'] = 'product'; -$lang->block->default['full']['my']['8'] = $lang->block->default['product']['2']; -$lang->block->default['full']['my']['8']['source'] = 'product'; -$lang->block->default['full']['my']['9'] = $lang->block->default['qa']['2']; -$lang->block->default['full']['my']['9']['source'] = 'qa'; -$lang->block->default['onlyTest']['my']['1'] = $lang->block->default['qa']['1']; -$lang->block->default['onlyTest']['my']['1']['source'] = 'qa'; -$lang->block->default['onlyTest']['my']['1']['grid'] = '8'; -$lang->block->default['onlyTest']['my']['2']['title'] = 'Dynamics'; -$lang->block->default['onlyTest']['my']['2']['block'] = 'dynamic'; -$lang->block->default['onlyTest']['my']['2']['grid'] = 4; -$lang->block->default['onlyTest']['my']['2']['source'] = ''; -$lang->block->default['onlyTest']['my']['3']['title'] = 'My Todos'; -$lang->block->default['onlyTest']['my']['3']['block'] = 'list'; -$lang->block->default['onlyTest']['my']['3']['grid'] = 6; -$lang->block->default['onlyTest']['my']['3']['source'] = 'todo'; -$lang->block->default['onlyTest']['my']['3']['params']['num'] = '20'; -$lang->block->default['onlyTest']['my']['4'] = $lang->block->default['qa']['2']; -$lang->block->default['onlyTest']['my']['4']['source'] = 'qa'; -$lang->block->default['onlyTest']['my']['4']['grid'] = 6; +$lang->block->default['full']['my']['3']['title'] = 'My Todos'; +$lang->block->default['full']['my']['3']['block'] = 'list'; +$lang->block->default['full']['my']['3']['grid'] = 4; +$lang->block->default['full']['my']['3']['source'] = 'todo'; +$lang->block->default['full']['my']['3']['params']['num'] = '20'; -$lang->block->default['onlyStory']['my']['1'] = $lang->block->default['project']['1']; -$lang->block->default['onlyStory']['my']['1']['source'] = 'project'; -$lang->block->default['onlyStory']['my']['1']['grid'] = 8; -$lang->block->default['onlyStory']['my']['2']['title'] = 'Dynamics'; -$lang->block->default['onlyStory']['my']['2']['block'] = 'dynamic'; -$lang->block->default['onlyStory']['my']['2']['grid'] = 4; -$lang->block->default['onlyStory']['my']['2']['source'] = ''; -$lang->block->default['onlyStory']['my']['3']['title'] = 'My Todos'; -$lang->block->default['onlyStory']['my']['3']['block'] = 'list'; -$lang->block->default['onlyStory']['my']['3']['grid'] = 6; -$lang->block->default['onlyStory']['my']['3']['source'] = 'todo'; -$lang->block->default['onlyStory']['my']['3']['params']['num'] = '20'; -$lang->block->default['onlyStory']['my']['4'] = $lang->block->default['product']['2']; -$lang->block->default['onlyStory']['my']['4']['source'] = 'product'; -$lang->block->default['onlyStory']['my']['4']['grid'] = 6; +$lang->block->default['full']['my']['4']['title'] = $lang->projectCommon . ' Statistic'; +$lang->block->default['full']['my']['4']['source'] = 'statistic'; +$lang->block->default['full']['my']['4']['source'] = 'program'; +$lang->block->default['full']['my']['4']['grid'] = 8; -$lang->block->default['onlyTask']['my']['1'] = $lang->block->default['project']['1']; -$lang->block->default['onlyTask']['my']['1']['source'] = 'project'; -$lang->block->default['onlyTask']['my']['1']['grid'] = 8; -$lang->block->default['onlyTask']['my']['2']['title'] = 'Dynamics'; -$lang->block->default['onlyTask']['my']['2']['block'] = 'dynamic'; -$lang->block->default['onlyTask']['my']['2']['grid'] = 4; -$lang->block->default['onlyTask']['my']['2']['source'] = ''; -$lang->block->default['onlyTask']['my']['3']['title'] = 'My Todos'; -$lang->block->default['onlyTask']['my']['3']['block'] = 'list'; -$lang->block->default['onlyTask']['my']['3']['grid'] = 6; -$lang->block->default['onlyTask']['my']['3']['source'] = 'todo'; -$lang->block->default['onlyTask']['my']['3']['params']['num'] = '20'; -$lang->block->default['onlyTask']['my']['4'] = $lang->block->default['project']['2']; -$lang->block->default['onlyTask']['my']['4']['source'] = 'project'; -$lang->block->default['onlyTask']['my']['4']['grid'] = 6; +$lang->block->default['full']['my']['5']['title'] = 'Personal Contribution'; +$lang->block->default['full']['my']['5']['block'] = 'contribute'; +$lang->block->default['full']['my']['5']['source'] = ''; +$lang->block->default['full']['my']['5']['grid'] = 4; + +$lang->block->default['full']['my']['6']['title'] = 'Recent ' . $lang->projectCommon; +$lang->block->default['full']['my']['6']['block'] = 'recentprogram'; +$lang->block->default['full']['my']['6']['source'] = 'program'; +$lang->block->default['full']['my']['6']['grid'] = 8; + +$lang->block->default['full']['my']['7']['title'] = 'Assigned To Me'; +$lang->block->default['full']['my']['7']['block'] = 'task'; +$lang->block->default['full']['my']['7']['grid'] = 4; + +$lang->block->default['full']['my']['7']['params']['orderBy'] = 'id_desc'; +$lang->block->default['full']['my']['7']['params']['num'] = '15'; +$lang->block->default['full']['my']['7']['params']['type'] = 'assignedTo'; + +$lang->block->default['full']['my']['8']['title'] = 'Human Input'; +$lang->block->default['full']['my']['8']['block'] = 'programteam'; +$lang->block->default['full']['my']['8']['grid'] = 8; + +$lang->block->default['full']['my']['9']['title'] = $lang->projectCommon . ' List'; +$lang->block->default['full']['my']['9']['block'] = 'program'; +$lang->block->default['full']['my']['9']['source'] = 'program'; +$lang->block->default['full']['my']['9']['grid'] = 8; + +$lang->block->default['full']['my']['9']['params']['orderBy'] = 'id_desc'; +$lang->block->default['full']['my']['9']['params']['num'] = '15'; $lang->block->num = 'Number'; $lang->block->type = 'Type'; @@ -254,11 +312,36 @@ $lang->block->availableBlocks->build = 'Builds'; $lang->block->availableBlocks->testtask = 'Requests'; $lang->block->availableBlocks->risk = 'My Risks'; +$lang->block->moduleList['program'] = $lang->projectCommon; $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['project'] = $lang->projectCommon; $lang->block->moduleList['qa'] = 'QA'; $lang->block->moduleList['todo'] = 'Todo'; +$lang->block->modules['program'] = new stdclass(); +$lang->block->modules['program']->availableBlocks = new stdclass(); +$lang->block->modules['program']->availableBlocks->program = $lang->projectCommon . ' List'; +$lang->block->modules['program']->availableBlocks->recentprogram = 'Recent ' . $lang->projectCommon; +$lang->block->modules['program']->availableBlocks->statistic = $lang->projectCommon . ' Statistic'; + +$lang->block->modules['scrum']['index'] = new stdclass(); +$lang->block->modules['scrum']['index']->availableBlocks = new stdclass(); +$lang->block->modules['scrum']['index']->availableBlocks->scrumoverall = $lang->projectCommon . ' Overall'; +$lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang->projectCommon . ' List'; +$lang->block->modules['scrum']['index']->availableBlocks->scrumproject = $lang->projectCommon . ' Overview'; +$lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang->productCommon . ' Overview'; +$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = 'Test Version'; +$lang->block->modules['scrum']['index']->availableBlocks->scrumroadmap = $lang->productCommon . ' Rode Map'; + +$lang->block->modules['cmmi']['index'] = new stdclass(); +$lang->block->modules['cmmi']['index']->availableBlocks = new stdclass(); +$lang->block->modules['cmmi']['index']->availableBlocks->cmmireport = $lang->projectCommon . ' Weekly'; +$lang->block->modules['cmmi']['index']->availableBlocks->cmmiestimate = 'Estimate'; +$lang->block->modules['cmmi']['index']->availableBlocks->cmmigantt = 'Plan Gantt Chart'; +$lang->block->modules['cmmi']['index']->availableBlocks->cmmiprogress = 'Progress Chart'; +$lang->block->modules['cmmi']['index']->availableBlocks->cmmiissue = $lang->projectCommon . ' Issue'; +$lang->block->modules['cmmi']['index']->availableBlocks->cmmirisk = $lang->projectCommon . ' Risk'; + $lang->block->modules['product'] = new stdclass(); $lang->block->modules['product']->availableBlocks = new stdclass(); $lang->block->modules['product']->availableBlocks->statistic = $lang->productCommon . ' Report'; @@ -338,6 +421,7 @@ $lang->block->orderByList->story['stage_desc'] = 'Story Phase DESC'; $lang->block->todoNum = 'Todo'; $lang->block->taskNum = 'Task'; $lang->block->bugNum = 'Bug'; +$lang->block->riskNum = 'Risk'; $lang->block->typeList = new stdclass(); @@ -370,12 +454,32 @@ $lang->block->typeList->project['doing'] = 'Ongoing'; $lang->block->typeList->project['all'] = 'All'; $lang->block->typeList->project['involved'] = 'Involved'; +$lang->block->typeList->scrum['undone'] = 'Unfinished'; +$lang->block->typeList->scrum['doing'] = 'Ongoing中'; +$lang->block->typeList->scrum['all'] = 'All'; +$lang->block->typeList->scrum['involved'] = 'Involved'; + $lang->block->typeList->testtask['wait'] = 'Waiting'; $lang->block->typeList->testtask['doing'] = 'Ongoing'; $lang->block->typeList->testtask['blocked'] = 'Blocked'; $lang->block->typeList->testtask['done'] = 'Done'; $lang->block->typeList->testtask['all'] = 'All'; +$lang->block->modules['program']->moreLinkList = new stdclass(); +$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|'; +$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|'; +$lang->block->modules['program']->moreLinkList->program = 'program|browse|'; +$lang->block->modules['program']->moreLinkList->cmmireport = 'weekly|index|'; +$lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|index|'; +$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|'; +$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|'; +$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|'; +$lang->block->modules['program']->moreLinkList->scrumroadmap = 'product|all|'; +$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|'; +$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|'; +$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|'; +$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|'; + $lang->block->modules['product']->moreLinkList = new stdclass(); $lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s'; $lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s'; diff --git a/module/block/view/printassigntomeblock.html.php b/module/block/view/printassigntomeblock.html.php index 379fa30f61..9085b18ead 100644 --- a/module/block/view/printassigntomeblock.html.php +++ b/module/block/view/printassigntomeblock.html.php @@ -16,7 +16,12 @@ $bool):?> global->flow != 'full' && $config->global->flow != 'onlyTask' && $type == 'task') continue;?> global->flow != 'full' && $config->global->flow != 'onlyTest' && $type == 'bug') continue;?> - >block->availableBlocks->$type;?> + > + + block->availableBlocks->$type;?> + '> + +
@@ -36,3 +41,10 @@ #assigntomeBlock > .nav {position: absolute; top: -41px; left: 120px;} #assigntomeBlock .block-todoes .todoes-form{top: -50px;} + diff --git a/module/block/view/programstatisticblock.html.php b/module/block/view/programstatisticblock.html.php index 00d3380f4b..e739b2941e 100644 --- a/module/block/view/programstatisticblock.html.php +++ b/module/block/view/programstatisticblock.html.php @@ -62,6 +62,14 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po .status-count{margin:auto} .status-count tr:first-child td:last-child{color:#000;font-weight:bold} + +.block-statistic .progress-group{margin-top: 20px; height: 65px;} +.block-statistic .weekly-title{font-weight: bold; font-size:14px; color: #3C4253;} +.block-statistic .weekly-small{font-size:12px; color: #838A9D;} +.block-statistic .weekly-progress {font-weight: bold; font-size:24px;} +.block-statistic .weekly-name{font-size:14px; color: #838A9D;} +.block-statistic .weekly-value{font-size:18px; color: #3C4253;} +.block-statistic .col-6 .stage{margin-left: 10px} diff --git a/module/story/view/track.html.php b/module/story/view/track.html.php new file mode 100644 index 0000000000..7b2deee001 --- /dev/null +++ b/module/story/view/track.html.php @@ -0,0 +1,86 @@ + + + +
+
+ +
+

+ noData;?> +

+
+ +
+ + + + + + + + + + + + + $requirement):?> + track;?> + + + + + + $story):?> + ';?> + + + + + + ';?> + + + + + + + + + + + + +
story->requirement;?>story->story;?>story->design;?>story->case;?>story->repoCommit;?>story->bug;?>
id"), $requirement->title, '', "title=$requirement->title");?> + + story->statusList, $requirement->status);?> + + createLink('story', 'view', "storyID=$storyID"), $story->title, '',"title='$story->title'");?> + design as $designID => $design):?> + createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '
';?> + +
+ case as $caseID => $case):?> + createLink('testcase', 'view', "caseID=$caseID"), $case->title, '', "title='$case->title'") . '
';?> + +
+ revision as $revision => $repoID):?> + createLink('design', 'revision', "repoID=$revision"), '#'. $revision) . '
'; + ?> + +
+ bug as $bugID => $bug):?> + createLink('bug', 'view', "bugID=$bugID"), $bug->title, '', "title='$bug->title'") . '
';?> + +
+
+ +
+
+ diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index e93fc565ec..ecac3587f9 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -62,6 +62,56 @@
story->legendVerify;?>
verify;?>
+ type == 'requirement'):?> + +
+
story->track;?>
+
+ + + + + + + + + + + + $storyInfo):?> + + + + + + + + + +
story->story;?>story->design;?>story->case;?>story->repoCommit;?>story->bug;?>
createLink('story', 'view', "storyID=$storyID"), $storyInfo->title, '', "title='$storyInfo->title'");?> + + design as $designID => $design):?> + createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '
';?> + +
+ case as $caseID => $case):?> + createLink('testcase', 'view', "caseID=$caseID"), $case->title, '', "title='$case->title'") . '
';?> + +
+ revision as $revision => $repoID):?> + createLink('design', 'revision', "repoID=$revision"), '#'. $revision) . '
'; + ?> + +
+ bug as $bugID => $bug):?> + createLink('bug', 'view', "bugID=$bugID"), $bug->title, '', "title='$bug->title'") . '
';?> + +
+
+
+ + fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?> createLink('action', 'comment', "objectType=story&objectID=$story->id");?> children)):?> @@ -334,12 +384,34 @@
+ template == 'cmmi'):?> +
+
    + id] = $item->title; + foreach($relation as $id => $title) + { + echo "
  • " . html::a($this->createLink('story', 'view', "id=$id", '', true), "#$id $title", '', "class='iframe' data-width='80%'"); + echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=remove&linkedID=$id"), '', 'hiddenwin', "class='deleter hide removeButton'"); + } + ?> + type == 'story') ? $lang->story->requirement : $lang->story->story;?> +
  • createLink('story', 'linkStory', "storyID=$story->id", '', true), $lang->story->link . $linkLang, '', "class='btn btn-info iframe' data-width='95%' id='linkButton'");?> + story->unlink . $linkLang, '', "class='btn btn-info' id='unlinkStory'");?>
  • +
+
+ global->flow != 'onlyStory'):?>
    @@ -454,6 +526,8 @@ js::set('productID', $story->product); js::set('branch', $story->branch); js::set('moduleID', $story->module); js::set('storyType', $story->type); +js::set('unlink', $lang->story->unlink); +js::set('cancel', $lang->cancel); ?> diff --git a/module/weekly/control.php b/module/weekly/control.php index 605ccc07ed..77f740e14b 100644 --- a/module/weekly/control.php +++ b/module/weekly/control.php @@ -40,7 +40,7 @@ class weekly extends control $this->view->postponed = $this->weekly->getPostponed($program); $this->view->nextWeek = $this->weekly->getTasksOfNextWeek($program, $date); $this->view->workload = $this->weekly->getWorkloadByType($program, $date); - $this->weekly->save($program, $this->view, $date); + $this->weekly->save($program, $date); $this->lang->modulePageNav = $this->weekly->getPageNav($this->view->program, $date); $this->display(); diff --git a/module/weekly/model.php b/module/weekly/model.php index 7e0937f656..9ca9330d2d 100644 --- a/module/weekly/model.php +++ b/module/weekly/model.php @@ -60,19 +60,18 @@ class weeklyModel extends model ->fetch(); } - public function save($program, $data, $date) + public function save($program, $date) { $report = new stdclass; - $report->pv = zget($data, 'pv', ''); - $report->ev = zget($data, 'ev', ''); - $report->ac = zget($data, 'ac', ''); - $report->sv = zget($data, 'sv', ''); - $report->cv = zget($data, 'cv', ''); + $report->pv = $this->getPV($program, $date); + $report->ev = $this->getEV($program, $date); + $report->ac = $this->getAC($program, $date); + $report->sv = $this->getSV($report->ev, $report->pv); + $report->cv = $this->getCV($report->ev, $report->ac); $report->program = $program; $report->weekStart = $this->getThisMonday($date); - $report->staff = zget($data, 'staff', ''); - $report->progress = zget($data, 'progress', ''); - $report->workload = json_encode(zget($data, 'workload', '')); + $report->staff = $this->getStaff($program); + $report->workload = json_encode($this->getWorkloadByType($program, $date)); $this->dao->replace(TABLE_WEEKLYREPORT)->data($report)->exec(); }