From 72666ee3c6f0155d9bb1306c5c1d3bd3ad5a8a07 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Sun, 3 Jan 2021 15:46:13 +0800 Subject: [PATCH 1/5] * Adjust the code. --- module/my/lang/de.php | 1 + module/my/lang/en.php | 1 + module/my/lang/fr.php | 1 + module/my/lang/vi.php | 1 + module/my/lang/zh-cn.php | 1 + module/my/lang/zh-tw.php | 1 + module/my/view/execution.html.php | 6 +++--- module/story/config.php | 4 ++-- module/user/model.php | 10 ++++++---- 9 files changed, 17 insertions(+), 9 deletions(-) diff --git a/module/my/lang/de.php b/module/my/lang/de.php index 20d7494eb7..370b8ea3d1 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept'; $lang->my->noTodo = 'Keine toDos. '; $lang->my->noData = 'No %s yet. '; $lang->my->storyChanged = "Story Changed"; +$lang->my->hours = 'Stunde/Tag'; $lang->my->myExecutions = 'My Stage/Sprint/Iteration'; $lang->my->name = 'Name'; diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 2285aeecb5..d0e01de893 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept'; $lang->my->noTodo = 'No todos yet. '; $lang->my->noData = 'No %s yet. '; $lang->my->storyChanged = "Story Changed"; +$lang->my->hours = "Hours/day"; $lang->my->myExecutions = "My Stage/Sprint/Iteration"; $lang->my->name = 'Name'; diff --git a/module/my/lang/fr.php b/module/my/lang/fr.php index 85423cbcd0..0aa2134719 100644 --- a/module/my/lang/fr.php +++ b/module/my/lang/fr.php @@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept'; $lang->my->noTodo = "Je n'ai rien à faire pour l'instant."; $lang->my->noData = 'No %s yet. '; $lang->my->storyChanged = "Story Changed"; +$lang->my->hours = 'Heure/jour'; $lang->my->myExecutions = 'My Stage/Sprint/Iteration'; $lang->my->name = 'Name'; diff --git a/module/my/lang/vi.php b/module/my/lang/vi.php index f830cb9b03..a17b89b01a 100644 --- a/module/my/lang/vi.php +++ b/module/my/lang/vi.php @@ -33,6 +33,7 @@ $lang->my->storyConcept = 'Story Concept'; $lang->my->noTodo = 'Chưa có việc nào.'; $lang->my->noData = 'No %s yet. '; $lang->my->storyChanged = "Story Changed"; +$lang->my->hours = "Giờ/ngày"; $lang->my->myExecutions = "My Stage/Sprint/Iteration"; $lang->my->name = 'Name'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index cce3a56f78..049d01887c 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -33,6 +33,7 @@ $lang->my->scoreRule = '积分规则'; $lang->my->noTodo = '暂时没有待办。'; $lang->my->noData = "暂时没有%s。"; $lang->my->storyChanged = "需求变更"; +$lang->my->hours = '工时/天'; $lang->my->myExecutions = "我参与的阶段/冲刺/迭代"; $lang->my->name = '名称'; diff --git a/module/my/lang/zh-tw.php b/module/my/lang/zh-tw.php index 3c162b19f0..ace0e64e43 100644 --- a/module/my/lang/zh-tw.php +++ b/module/my/lang/zh-tw.php @@ -33,6 +33,7 @@ $lang->my->scoreRule = '積分規則'; $lang->my->noTodo = '暫時沒有待辦。'; $lang->my->noData = "暫時沒有%s。"; $lang->my->storyChanged = "需求變更"; +$lang->my->hours = '工時/天'; $lang->my->myExecutions = "我參與的階段/衝刺/迭代"; $lang->my->name = '名稱'; diff --git a/module/my/view/execution.html.php b/module/my/view/execution.html.php index a31109f7e4..6393bd88eb 100644 --- a/module/my/view/execution.html.php +++ b/module/my/view/execution.html.php @@ -40,8 +40,8 @@ statusAB;?> team->role;?> team->join;?> - team->hours;?> - project->waitTasks;?> + my->hours;?> + project->assignedToMe;?> project->progress;?> @@ -70,7 +70,7 @@ role;?> join;?> hours;?> - waitTasks;?> + assignedToMeTasks;?> progress}' data-border-color='#ddd' data-back-color='#f1f1f1'> {$execution->progress}%";?> diff --git a/module/story/config.php b/module/story/config.php index bf40278686..1f334ad7b7 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -107,7 +107,7 @@ $config->story->datatable->fieldList['stage']['required'] = 'no'; $config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB'; $config->story->datatable->fieldList['openedBy']['fixed'] = 'no'; -$config->story->datatable->fieldList['openedBy']['width'] = '90'; +$config->story->datatable->fieldList['openedBy']['width'] = '70'; $config->story->datatable->fieldList['openedBy']['required'] = 'no'; $config->story->datatable->fieldList['openedDate']['title'] = 'openedDate'; @@ -117,7 +117,7 @@ $config->story->datatable->fieldList['openedDate']['required'] = 'no'; $config->story->datatable->fieldList['assignedTo']['title'] = 'assignedToAB'; $config->story->datatable->fieldList['assignedTo']['fixed'] = 'no'; -$config->story->datatable->fieldList['assignedTo']['width'] = '120'; +$config->story->datatable->fieldList['assignedTo']['width'] = '100'; $config->story->datatable->fieldList['assignedTo']['required'] = 'no'; $config->story->datatable->fieldList['assignedDate']['title'] = 'assignedDate'; diff --git a/module/user/model.php b/module/user/model.php index bedd57e318..bedd50ddbc 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1005,9 +1005,9 @@ class userModel extends model /* Get all tasks and compute totalConsumed, totalLeft, totalWait, progress according to them. */ $hours = array(); - $emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0); + $emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0, 'assignedToMeTasks' => 0); $searchField = $type == 'project' ? 'PRJ' : 'project'; - $tasks = $this->dao->select('id, PRJ, project, consumed, `left`, status') + $tasks = $this->dao->select('id, PRJ, project, consumed, `left`, status, assignedTo') ->from(TABLE_TASK) ->where('parent')->lt(1) ->andWhere($searchField)->in($projectIdList)->fi() @@ -1023,6 +1023,7 @@ class userModel extends model if($task->status == 'wait') $hour->waitTasks += 1; if($task->status != 'cancel') $hour->totalConsumed += $task->consumed; if($task->status != 'cancel' and $task->status != 'closed') $hour->totalLeft += $task->left; + if($task->assignedTo == $account) $hour->assignedToMeTasks += 1; } $hours[$projectID] = $hour; } @@ -1052,8 +1053,9 @@ class userModel extends model } /* Process the hours. */ - $project->progress = isset($hours[$project->id]) ? $hours[$project->id]->progress : 0; - $project->waitTasks = isset($hours[$project->id]) ? $hours[$project->id]->waitTasks : 0; + $project->progress = isset($hours[$project->id]) ? $hours[$project->id]->progress : 0; + $project->waitTasks = isset($hours[$project->id]) ? $hours[$project->id]->waitTasks : 0; + $project->assignedToMeTasks = isset($hours[$project->id]) ? $hours[$project->id]->assignedToMeTasks : 0; if($project->project) $project->projectName = $projectList[$project->project]->name; $myProjects[$project->id] = $project; From 0168644d98f24664cc5f5aa7a454dfba809f7972 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Sun, 3 Jan 2021 15:49:00 +0800 Subject: [PATCH 2/5] * Adjust code. --- module/my/view/issue.html.php | 13 +++++++------ module/my/view/project.html.php | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/module/my/view/issue.html.php b/module/my/view/issue.html.php index 81f3be991f..58944e7770 100644 --- a/module/my/view/issue.html.php +++ b/module/my/view/issue.html.php @@ -36,21 +36,21 @@ recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID"; ?> - idAB);?> + idAB);?> issue->type;?> issue->title;?> - issue->severity;?> + issue->severity;?> issue->pri;?> - issue->assignedTo;?> + issue->assignedTo;?> issue->owner;?> - issue->status;?> - issue->createdDate;?> + issue->status;?> + issue->createdDate;?> actions;?> - + id);?> issue->typeList, $issue->type);?> createLink('issue', 'view', "id=$issue->id", '', '', $issue->PRJ), $issue->title, '', "data-group='project'");?> @@ -59,6 +59,7 @@ assignedTo);?> owner);?> issue->statusList, $issue->status);?> + createdDate = substr($issue->createdDate, 0, 10)?> createdDate;?> idAB;?> program->PRJName;?> - program->PRJCode;?> program->PRJStatus;?> program->begin;?> program->end;?> @@ -54,7 +53,6 @@ createLink('program', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project'");?> - code;?> project->statusList, $project->status, '');?> begin;?> end == '0000-00-00' ? '' : $project->end;?> From 7d03d801084494f48346d41c3fbb0ab36cc806da Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Sun, 3 Jan 2021 16:25:35 +0800 Subject: [PATCH 3/5] * Adjust the code. --- module/personnel/js/addwhitelist.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/personnel/js/addwhitelist.js b/module/personnel/js/addwhitelist.js index 6517aa26eb..ea8c37af6a 100644 --- a/module/personnel/js/addwhitelist.js +++ b/module/personnel/js/addwhitelist.js @@ -99,5 +99,7 @@ function changeUsers() $(function() { + if(window.config.currentModule == 'personnel' && window.config.currentMethod == 'addwhitelist') $("li[data-id='set']").addClass('active'); + changeUsers(); }) From 3c46a33200db1e47c03aab2644335677ebc6eed0 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Sun, 3 Jan 2021 16:37:43 +0800 Subject: [PATCH 4/5] * Adjust code. --- module/my/view/project.html.php | 6 +++--- module/program/config.php | 2 +- module/program/model.php | 2 +- module/program/view/pgmbrowsebylist.html.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 58a416e7e2..8c2af61f2f 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -63,8 +63,8 @@ status == 'doing') common::printIcon('program', 'PRJClose', "projectID=$project->id", $project, 'list', 'off', '', 'iframe', true);?> status == 'closed') common::printIcon('program', 'PRJActivate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe', true);?>
- -