* finish task #7499.

This commit is contained in:
wangyidong
2019-03-08 14:48:50 +08:00
parent ad09223066
commit 487e802420
7 changed files with 98 additions and 20 deletions
+1 -1
View File
@@ -1371,7 +1371,7 @@ EOD;
{
$module = $this->app->getModuleName();
$method = $this->app->getMethodName();
if(isset($this->app->user->modifyPassword) and $this->app->user->modifyPassword and ($module != 'my' or $method != 'changepassword')) die(js::locate(helper::createLink('my', 'changepassword')));
if(!empty($this->app->user->modifyPassword) and (($module != 'my' or $method != 'changepassword') and ($module != 'user' or $method != 'logout'))) die(js::locate(helper::createLink('my', 'changepassword')));
if($this->isOpenMethod($module, $method)) return true;
if(!$this->loadModel('user')->isLogon() and $this->server->php_auth_user) $this->user->identifyByPhpAuth();
if(!$this->loadModel('user')->isLogon() and $this->cookie->za) $this->user->identifyByCookie();
+2 -2
View File
@@ -58,7 +58,7 @@ $lang->product->accessDenied = "You have no access to {$lang->productCommon}."
$lang->product->id = 'ID';
$lang->product->name = 'Name';
$lang->product->code = 'Alias';
$lang->product->line = 'Product Line';
$lang->product->line = "{$lang->productCommon} Line";
$lang->product->order = 'Sort';
$lang->product->type = 'Type';
$lang->product->status = 'Status';
@@ -121,7 +121,7 @@ $lang->product->aclList['custom'] = 'Custom (Team members and Whitelist members
$lang->product->storySummary = " <strong>%s</strong> Story(ies), <strong>%s</strong> hour(s) estimated, case coverage is <strong>%s</strong> on this page.";
$lang->product->checkedSummary = " <strong>%total%</strong> Checked, <strong>%estimate%</strong> hour(s) estimated, case coverage is <strong>%rate%</strong>.";
$lang->product->noModule = '<div>You have no modules</div><div>Manage now</div>';
$lang->product->noProduct = 'No product. ';
$lang->product->noProduct = "No {$lang->productCommon}. ";
$lang->product->noMatched = '"%s" cannot be found.' . $lang->productCommon;
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
+3 -3
View File
@@ -58,7 +58,7 @@ $lang->product->accessDenied = "您无权访问该{$lang->productCommon}";
$lang->product->id = '编号';
$lang->product->name = "{$lang->productCommon}名称";
$lang->product->code = "{$lang->productCommon}代号";
$lang->product->line = '产品线';
$lang->product->line = "{$lang->productCommon}线";
$lang->product->order = '排序';
$lang->product->type = "{$lang->productCommon}类型";
$lang->product->status = '状态';
@@ -120,8 +120,8 @@ $lang->product->aclList['custom'] = '自定义白名单(团队成员和白名
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时,用例覆盖率 <strong>%s</strong>。";
$lang->product->checkedSummary = "选中 <strong>%total%</strong> 个需求,预计 <strong>%estimate%</strong> 个工时,用例覆盖率 <strong>%rate%</strong>。";
$lang->product->noModule = '<div>您现在还没有模块信息</div><div>请维护产品模块</div>';
$lang->product->noProduct = '暂时没有产品。';
$lang->product->noModule = "<div>您现在还没有模块信息</div><div>请维护{$lang->productCommon}模块</div>";
$lang->product->noProduct = "暂时没有{$lang->productCommon}。";
$lang->product->noMatched = '找不到包含"%s"的' . $lang->productCommon;
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
+48 -2
View File
@@ -283,11 +283,57 @@ class project extends control
}
elseif($groupBy == 'assignedTo')
{
$groupTasks[$task->assignedToRealName][] = $task;
if(isset($task->team))
{
foreach($task->team as $team)
{
$cloneTask = clone $task;
$cloneTask->assignedTo = $team->account;
$cloneTask->estimate = $team->estimate;
$cloneTask->consumed = $team->consumed;
$cloneTask->left = $team->left;
if($team->left == 0) $cloneTask->status = 'done';
$realname = zget($users, $team->account);
$cloneTask->assignedToRealName = $realname;
$groupTasks[$realname][] = $cloneTask;
}
}
else
{
$groupTasks[$task->assignedToRealName][] = $task;
}
}
elseif($groupBy == 'finishedBy')
{
$groupTasks[$users[$task->finishedBy]][] = $task;
if(isset($task->team))
{
$task->consumed = $task->estimate = $task->left = 0;
foreach($task->team as $team)
{
if($team->left != 0)
{
$task->estimate += $team->estimate;
$task->consumed += $team->consumed;
$task->left += $team->left;
continue;
}
$cloneTask = clone $task;
$cloneTask->finishedBy = $team->account;
$cloneTask->estimate = $team->estimate;
$cloneTask->consumed = $team->consumed;
$cloneTask->left = $team->left;
$cloneTask->status = 'done';
$realname = zget($users, $team->account);
$groupTasks[$realname][] = $cloneTask;
}
if(!empty($task->left)) $groupTasks[$users[$task->finishedBy]][] = $task;
}
else
{
$groupTasks[$users[$task->finishedBy]][] = $task;
}
}
elseif($groupBy == 'closedBy')
{
+7 -7
View File
@@ -55,7 +55,7 @@ $lang->project->other = 'Other:';
$lang->project->deleted = 'Deleted';
$lang->project->delayed = 'Delayed';
$lang->project->product = $lang->project->products;
$lang->project->readjustTime = 'Adjust project begin and end time';
$lang->project->readjustTime = "Adjust {$lang->projectCommon} begin and end time";
$lang->project->readjustTask = 'Adjust task start date and deadline';
$lang->project->effort = 'Effort';
$lang->project->relatedMember = 'Team Member';
@@ -100,7 +100,7 @@ $lang->project->statusList['doing'] = 'Doing';
$lang->project->statusList['suspended'] = 'Suspend';
$lang->project->statusList['closed'] = 'Closed';
$lang->project->aclList['open'] = "Default (Users who can visit Project have access to it.)";
$lang->project->aclList['open'] = "Default (Users who can visit {$lang->projectCommon} have access to it.)";
$lang->project->aclList['private'] = 'Private (For team members only.)';
$lang->project->aclList['custom'] = 'Whitelist (Team members and the whitelist members have access to it.)';
@@ -129,7 +129,7 @@ $lang->project->unlinkStoryTasks = 'Unlink';
$lang->project->linkedProducts = 'Linked Product';
$lang->project->unlinkedProducts = 'Unlinked Product';
$lang->project->view = "Overview";
$lang->project->create = "Create Project";
$lang->project->create = "Create {$lang->projectCommon}";
$lang->project->copy = "Copy {$lang->projectCommon}";
$lang->project->delete = "Delete";
$lang->project->browse = "Browse";
@@ -192,7 +192,7 @@ $lang->project->aboveAllProduct = "All the above {$lang->productCommon}";
$lang->project->aboveAllProject = "All the above {$lang->projectCommon}";
/* 页面提示。*/
$lang->project->linkStoryByPlanTips = 'It will link all stories in this plan to the project.';
$lang->project->linkStoryByPlanTips = "It will link all stories in this plan to the {$lang->projectCommon}.";
$lang->project->selectProject = "Select {$lang->projectCommon}";
$lang->project->beginAndEnd = 'Duration';
$lang->project->begin = 'Begin';
@@ -225,7 +225,7 @@ $lang->project->copyFromProject = "Copy from {$lang->projectCommon} <strong>
$lang->project->cancelCopy = 'Cancel Copy';
$lang->project->byPeriod = 'By Time';
$lang->project->byUser = 'By User';
$lang->project->noProject = 'No projects. ';
$lang->project->noProject = "No {$lang->projectCommon}. ";
$lang->project->noMembers = 'No members. ';
/* 交互提示。*/
@@ -262,8 +262,8 @@ $lang->project->charts->burn->graph->reference = 'Ideal';
$lang->project->charts->burn->graph->actuality = 'Actual';
$lang->project->placeholder = new stdclass();
$lang->project->placeholder->code = 'Abbreviation of project name';
$lang->project->placeholder->totalLeft = 'Estimates at the beginning of the Project.';
$lang->project->placeholder->code = "Abbreviation of {$lang->projectCommon} name";
$lang->project->placeholder->totalLeft = "Estimates at the beginning of the {$lang->projectCommon}.";
$lang->project->selectGroup = new stdclass();
$lang->project->selectGroup->done = '(Done)';
+4 -4
View File
@@ -55,7 +55,7 @@ $lang->project->other = '其他:';
$lang->project->deleted = '已删除';
$lang->project->delayed = '已延期';
$lang->project->product = $lang->project->products;
$lang->project->readjustTime = '调整项目起止时间';
$lang->project->readjustTime = "调整{$lang->projectCommon}起止时间";
$lang->project->readjustTask = '顺延任务的起止时间';
$lang->project->effort = '日志';
$lang->project->relatedMember = '相关成员';
@@ -192,7 +192,7 @@ $lang->project->aboveAllProduct = "以上所有{$lang->productCommon}";
$lang->project->aboveAllProject = "以上所有{$lang->projectCommon}";
/* 页面提示。*/
$lang->project->linkStoryByPlanTips = '此操作会将所选计划下面的需求全部关联到此项目中';
$lang->project->linkStoryByPlanTips = "此操作会将所选计划下面的需求全部关联到此{$lang->projectCommon}中";
$lang->project->selectProject = "请选择{$lang->projectCommon}";
$lang->project->beginAndEnd = '起止时间';
$lang->project->begin = '开始日期';
@@ -225,7 +225,7 @@ $lang->project->copyFromProject = "复制自{$lang->projectCommon} <strong>%s</s
$lang->project->cancelCopy = '取消复制';
$lang->project->byPeriod = '按时间段';
$lang->project->byUser = '按用户';
$lang->project->noProject = '暂时没有项目。';
$lang->project->noProject = "暂时没有{$lang->projectCommon}。";
$lang->project->noMembers = '暂时没有团队成员。';
/* 交互提示。*/
@@ -263,7 +263,7 @@ $lang->project->charts->burn->graph->actuality = '实际';
$lang->project->placeholder = new stdclass();
$lang->project->placeholder->code = '团队内部的简称';
$lang->project->placeholder->totalLeft = '项目开始时的总预计工时';
$lang->project->placeholder->totalLeft = "{$lang->projectCommon}开始时的总预计工时";
$lang->project->selectGroup = new stdclass();
$lang->project->selectGroup->done = '(已结束)';
+33 -1
View File
@@ -1378,7 +1378,39 @@ class task extends control
foreach($tasks as $task)
{
$task->storyTitle = isset($stories[$task->story]) ? $stories[$task->story]->title : '';
$groupTasks[$task->$orderBy][] = $task;
if(isset($task->team))
{
if($orderBy == 'finishedBy') $task->consumed = $task->estimate = $task->left = 0;
foreach($task->team as $team)
{
if($orderBy == 'finishedBy' and $team->left != 0)
{
$task->estimate += $team->estimate;
$task->consumed += $team->consumed;
$task->left += $team->left;
continue;
}
$cloneTask = clone $task;
$cloneTask->estimate = $team->estimate;
$cloneTask->consumed = $team->consumed;
$cloneTask->left = $team->left;
if($team->left == 0) $cloneTask->status = 'done';
if($orderBy == 'assignedTo')
{
$cloneTask->assignedToRealName = zget($users, $team->account);
$cloneTask->assignedTo = $team->account;
}
if($orderBy == 'finishedBy')$cloneTask->finishedBy = $team->account;
$groupTasks[$team->account][] = $cloneTask;
}
if(!empty($task->left) and $orderBy == 'finishedBy') $groupTasks[$task->finishedBy][] = $task;
}
else
{
$groupTasks[$task->$orderBy][] = $task;
}
}
$tasks = array();