diff --git a/module/automation/control.php b/module/automation/control.php index 841cc4fad4..8c7ad1eedf 100644 --- a/module/automation/control.php +++ b/module/automation/control.php @@ -11,14 +11,6 @@ */ class automation extends control { - /** - * Project id. - * - * @var int - * @access public - */ - public $projectID = 0; - /** * Products. * diff --git a/module/block/control.php b/module/block/control.php index e0ae443afc..bbf18325b2 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -853,6 +853,7 @@ class block extends control $this->loadModel('weekly'); $this->app->loadLang('task'); $this->app->loadLang('story'); + $this->app->loadLang('bug'); /* Set project status and count. */ $status = isset($this->params->type) ? $this->params->type : 'all'; @@ -975,34 +976,6 @@ class block extends control $plans[$product] = $plan; } - /* Get projects. */ - $projects = $this->dao->select('t1.product, t2.status, t2.end')->from(TABLE_PROJECTPRODUCT)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id') - ->where('t1.product')->in($productIdList) - ->andWhere('t2.deleted')->eq(0) - ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() - ->fetchGroup('product'); - foreach($projects as $product => $productProjects) - { - $undone= 0; - $done = 0; - $delay = 0; - - foreach($productProjects as $project) - { - ($project->status == 'done' or $project->status == 'closed') ? $done++ : $undone++; - if($project->status != 'done' && $project->status != 'closed' && $project->status != 'suspended' && $project->end < helper::today()) $delay++; - } - - $project = array(); - $project['undone'] = $undone; - $project['done'] = $done; - $project['delay'] = $delay; - $project['all'] = count($productProjects); - - $projects[$product] = $project; - } - /* Get releases. */ $releases = $this->dao->select('product, status, COUNT(*) AS count')->from(TABLE_RELEASE) ->where('deleted')->eq(0) @@ -1028,14 +1001,12 @@ class block extends control { $product->stories = isset($stories[$productID]) ? $stories[$productID] : 0; $product->plans = isset($plans[$productID]) ? $plans[$productID] : 0; - $product->projects = isset($projects[$productID]) ? $projects[$productID] : 0; $product->releases = isset($releases[$productID]) ? $releases[$productID] : 0; $product->lastRelease = isset($lastReleases[$productID]) ? $lastReleases[$productID] : 0; } $this->app->loadLang('story'); $this->app->loadLang('productplan'); - $this->app->loadLang('project'); $this->app->loadLang('release'); $this->view->products = $products; diff --git a/module/block/js/admin.js b/module/block/js/admin.js index 6199a79d67..9586844079 100644 --- a/module/block/js/admin.js +++ b/module/block/js/admin.js @@ -11,7 +11,6 @@ $(function() if($blocksList.find('#moduleBlock').val() == 'scrumtest' && $('#paramstype').val() != 'all') { - console.log($('#paramstype').val()); $titleInput.val(value); } else @@ -19,8 +18,6 @@ $(function() var lang = config.clientLang; if(lang.indexOf('zh') >= 0) { - console.log(preValue, blockTitle); - console.log(blockTitle.indexOf(preValue)); if(blockTitle.indexOf(preValue) >= 0) { blockTitle = blockTitle.replace(preValue, value); diff --git a/module/block/lang/de.php b/module/block/lang/de.php index 2d4307671a..06ea79cfe3 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Gitter'; $lang->block->color = 'Farbe'; $lang->block->reset = 'Zurücksetzen'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Konto'; @@ -355,7 +351,6 @@ $lang->block->availableBlocks->testtask = 'Testaufgaben'; $lang->block->availableBlocks->risk = 'My Risks'; $lang->block->availableBlocks->issue = 'My Issues'; -global $config; if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project'; $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index fd92c396d1..4d8a968019 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Position'; $lang->block->color = 'Color'; $lang->block->reset = 'Reset Layout'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Account'; @@ -355,7 +351,6 @@ $lang->block->availableBlocks->testtask = 'Requests'; $lang->block->availableBlocks->risk = 'My Risks'; $lang->block->availableBlocks->issue = 'My Issues'; -global $config; if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project'; $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index 0b2043849d..9a191bb6fd 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Position'; $lang->block->color = 'Couleur'; $lang->block->reset = 'Réinit'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Compte'; @@ -355,7 +351,6 @@ $lang->block->availableBlocks->testtask = 'Recettes'; $lang->block->availableBlocks->risk = 'My Risks'; $lang->block->availableBlocks->issue = 'My Issues'; -global $config; if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project'; $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/vi.php b/module/block/lang/vi.php index 2b82f707ab..38576d2bc6 100644 --- a/module/block/lang/vi.php +++ b/module/block/lang/vi.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Vị trí'; $lang->block->color = 'Màu'; $lang->block->reset = 'Thiết lập lại giao diện'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Tài khoản'; @@ -355,7 +351,6 @@ $lang->block->availableBlocks->testtask = 'Yêu cầu'; $lang->block->availableBlocks->risk = 'My Risks'; $lang->block->availableBlocks->issue = 'My Issues'; -global $config; if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project'; $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index f6312957b6..5be31c3d43 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -18,12 +18,8 @@ $lang->block->grid = '位置'; $lang->block->color = '颜色'; $lang->block->reset = '恢复默认'; $lang->block->story = '需求'; -$lang->block->bug = 'Bug'; $lang->block->investment = '投入'; -$lang->block->left = '剩余'; $lang->block->estimate = '预计工时'; -$lang->block->doneBugs = '已解决'; -$lang->block->leftBugs = '未解决'; $lang->block->last = '近期'; $lang->block->account = '所属用户'; @@ -291,11 +287,11 @@ $lang->block->default['full']['my']['3']['params']['count'] = '20'; if($config->systemMode == 'new') { -$lang->block->default['full']['my']['4']['title'] = '项目统计'; -$lang->block->default['full']['my']['4']['block'] = 'statistic'; -$lang->block->default['full']['my']['4']['source'] = 'project'; -$lang->block->default['full']['my']['4']['grid'] = 8; -$lang->block->default['full']['my']['4']['params']['count'] = '20'; + $lang->block->default['full']['my']['4']['title'] = '项目统计'; + $lang->block->default['full']['my']['4']['block'] = 'statistic'; + $lang->block->default['full']['my']['4']['source'] = 'project'; + $lang->block->default['full']['my']['4']['grid'] = 8; + $lang->block->default['full']['my']['4']['params']['count'] = '20'; } $lang->block->default['full']['my']['5']['title'] = '我的贡献'; @@ -355,7 +351,6 @@ $lang->block->availableBlocks->testtask = '测试版本列表'; $lang->block->availableBlocks->risk = '我的风险'; $lang->block->availableBlocks->issue = '我的问题'; -global $config; if($config->systemMode == 'new') $lang->block->moduleList['project'] = '项目'; $lang->block->moduleList['product'] = $lang->productCommon; $lang->block->moduleList['execution'] = $lang->execution->common; diff --git a/module/block/view/productstatisticblock.html.php b/module/block/view/productstatisticblock.html.php index a18907cc85..40f7d58547 100644 --- a/module/block/view/productstatisticblock.html.php +++ b/module/block/view/productstatisticblock.html.php @@ -175,10 +175,6 @@ $(function()