*Finish task #45148.
This commit is contained in:
@@ -31,10 +31,10 @@ $lang->execution->canceledDate = 'CanceledDate';
|
||||
$lang->execution->begin = 'Begin';
|
||||
$lang->execution->end = 'End';
|
||||
$lang->execution->dateRange = 'Duration';
|
||||
$lang->execution->realBeganAB = 'Actual Begin';
|
||||
$lang->execution->realEndAB = 'Actual End';
|
||||
$lang->execution->realBegan = 'Actual Begin';
|
||||
$lang->execution->realBeganDate = 'Actual Begin';
|
||||
$lang->execution->realEnd = 'Actual End';
|
||||
$lang->execution->realEndDate = 'Actual End';
|
||||
$lang->execution->to = 'To';
|
||||
$lang->execution->days = ' Days';
|
||||
$lang->execution->day = ' Days';
|
||||
@@ -353,10 +353,10 @@ $lang->execution->unfinishedExecution = "This {$lang->executionCommon} h
|
||||
$lang->execution->unfinishedTask = "[%s] unfinished tasks. ";
|
||||
$lang->execution->unresolvedBug = "[%s] unresolved bugs. ";
|
||||
$lang->execution->projectNotEmpty = 'Project cannot be empty.';
|
||||
$lang->execution->realBeganNotEmpty = 'Actual begin should not be empty.';
|
||||
$lang->execution->realBeganNotFuture = 'Actual begin should not be a future date.';
|
||||
$lang->execution->realEndNotEmpty = 'Actual end should not be empty.';
|
||||
$lang->execution->realEndNotFuture = 'Actual end should not be a future date.';
|
||||
$lang->execution->realBeganNotEmpty = 'Actual Begin should not be empty.';
|
||||
$lang->execution->realBeganNotFuture = 'Actual Begin should be < = today.';
|
||||
$lang->execution->realEndNotEmpty = 'Actual End should not be empty.';
|
||||
$lang->execution->realEndNotFuture = 'Actual End should be < = today.';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -31,10 +31,10 @@ $lang->execution->canceledDate = '取消日期';
|
||||
$lang->execution->begin = '计划开始';
|
||||
$lang->execution->end = '计划完成';
|
||||
$lang->execution->dateRange = '起始日期';
|
||||
$lang->execution->realBegan = '实际开始';
|
||||
$lang->execution->realEnd = '实际完成';
|
||||
$lang->execution->realBeganDate = '实际开始日期';
|
||||
$lang->execution->realEndDate = '实际完成日期';
|
||||
$lang->execution->realBeganAB = '实际开始';
|
||||
$lang->execution->realEndAB = '实际完成';
|
||||
$lang->execution->realBegan = '实际开始日期';
|
||||
$lang->execution->realEnd = '实际完成日期';
|
||||
$lang->execution->to = '至';
|
||||
$lang->execution->days = '可用工作日';
|
||||
$lang->execution->day = '天';
|
||||
@@ -354,9 +354,9 @@ $lang->execution->unfinishedTask = "[%s]个未完成的任务,";
|
||||
$lang->execution->unresolvedBug = "[%s]个未解决的bug,";
|
||||
$lang->execution->projectNotEmpty = '所属项目不能为空。';
|
||||
$lang->execution->realBeganNotEmpty = "实际开始不能为空。";
|
||||
$lang->execution->realBeganNotFuture = "实际开始不能为未来日期。";
|
||||
$lang->execution->realBeganNotFuture = "实际开始不能大于当前日期。";
|
||||
$lang->execution->realEndNotEmpty = "实际完成不能为空。";
|
||||
$lang->execution->realEndNotFuture = "实际完成不能为未来日期。";
|
||||
$lang->execution->realEndNotFuture = "实际完成不能大于当前日期。";
|
||||
|
||||
|
||||
/* 统计。*/
|
||||
|
||||
@@ -704,25 +704,21 @@ class executionModel extends model
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->remove('comment')->get();
|
||||
|
||||
if($execution->realBegan == '')
|
||||
{
|
||||
dao::$errors['realBegan'] = $this->lang->execution->realBeganNotEmpty;
|
||||
return false;
|
||||
}
|
||||
if($execution->realBegan > $now)
|
||||
{
|
||||
dao::$errors['realBegan'] = $this->lang->execution->realBeganNotFuture;
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)->autoCheck()->where('id')->eq((int)$executionID)->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
if($execution->realBegan == '')
|
||||
{
|
||||
dao::$errors['realBegan'] = $this->lang->execution->realBeganNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($execution->realBegan > $now)
|
||||
{
|
||||
dao::$errors['realBegan'] = $this->lang->execution->realBeganNotFuture;
|
||||
return false;
|
||||
}
|
||||
|
||||
return common::createChanges($oldExecution, $execution);
|
||||
}
|
||||
if(!dao::isError()) return common::createChanges($oldExecution, $execution);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -869,25 +865,26 @@ class executionModel extends model
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
if($execution->realEnd == '')
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->execution->realEndNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($execution->realEnd > $now)
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->execution->realEndNotFuture;
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)
|
||||
->autoCheck()
|
||||
->where('id')->eq((int)$executionID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
if($execution->realEnd == '')
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->execution->realEndNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($execution->realEnd > $now)
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->execution->realEndNotFuture;
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
$this->loadModel('score')->create('execution', 'close', $oldExecution);
|
||||
return common::createChanges($oldExecution, $execution);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</tr>
|
||||
<?php $this->printExtendFields($execution, 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->realEndDate;?></th>
|
||||
<th><?php echo $lang->execution->realEnd;?></th>
|
||||
<td>
|
||||
<div class='w-150px'>
|
||||
<?php echo html::input('realEnd',(!empty($execution->realEnd) && $execution->realEnd != '0000-00-00' ? $execution->realEnd : date('Y-m-d')), "class='form-control form-date' required");?>
|
||||
|
||||
@@ -238,13 +238,13 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->begin;?></th>
|
||||
<td><?php echo $execution->begin;?></td>
|
||||
<th><?php echo $lang->execution->realBegan;?></th>
|
||||
<th><?php echo $lang->execution->realBeganAB;?></th>
|
||||
<td><?php echo $execution->realBegan == '0000-00-00' ? '' : $execution->realBegan;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->end;?></th>
|
||||
<td><?php echo $execution->end;?></td>
|
||||
<th><?php echo $lang->execution->realEnd;?></th>
|
||||
<th><?php echo $lang->execution->realEndAB;?></th>
|
||||
<td><?php echo $execution->realEnd == '0000-00-00' ? '' : $execution->realEnd;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -108,10 +108,10 @@ $lang->project->surplus = 'Left';
|
||||
$lang->project->progress = 'Progress';
|
||||
$lang->project->dateRange = 'Duration';
|
||||
$lang->project->to = ' to ';
|
||||
$lang->project->realEnd = 'Actual End';
|
||||
$lang->project->realBeganAB = 'Actual Begin';
|
||||
$lang->project->realEndAB = 'Actual End';
|
||||
$lang->project->realBegan = 'Actual Begin';
|
||||
$lang->project->realEndDate = 'Actual End';
|
||||
$lang->project->realBeganDate = 'Actual Begin';
|
||||
$lang->project->realEnd = 'Actual End';
|
||||
$lang->project->bygrid = 'Kanban';
|
||||
$lang->project->bylist = 'List';
|
||||
$lang->project->bycard = 'Card';
|
||||
@@ -180,7 +180,7 @@ $lang->project->unlinkExecutionMember = "The user participated in %s executions
|
||||
$lang->project->unlinkExecutionMembers = "The team members you are removing are also in the execution team of this project. Do you want to remove them from the execution team too?";
|
||||
|
||||
$lang->project->realEndNotEmpty = 'Actual End should not be empty.';
|
||||
$lang->project->realEndNotFuture = 'Actual End should not be a future date.';
|
||||
$lang->project->realEndNotFuture = 'Actual End should be < = today.';
|
||||
|
||||
$lang->project->tenThousand = '';
|
||||
|
||||
|
||||
@@ -108,10 +108,10 @@ $lang->project->surplus = '剩余';
|
||||
$lang->project->progress = '进度';
|
||||
$lang->project->dateRange = '起止日期';
|
||||
$lang->project->to = '至';
|
||||
$lang->project->realEnd = '实际完成';
|
||||
$lang->project->realBegan = '实际开始';
|
||||
$lang->project->realEndDate = '实际完成日期';
|
||||
$lang->project->realBeganDate = '实际开始日期';
|
||||
$lang->project->realBeganAB = '实际开始';
|
||||
$lang->project->realEndAB = '实际完成';
|
||||
$lang->project->realBegan = '实际开始日期';
|
||||
$lang->project->realEnd = '实际完成日期';
|
||||
$lang->project->bygrid = '看板';
|
||||
$lang->project->bylist = '列表';
|
||||
$lang->project->bycard = '卡片';
|
||||
@@ -180,7 +180,7 @@ $lang->project->unlinkExecutionMember = "该用户参与了%s%s%s个{$lang->exe
|
||||
$lang->project->unlinkExecutionMembers = "移除的团队成员还参与了项目下的执行,是否同步从执行团队中移除?";
|
||||
|
||||
$lang->project->realEndNotEmpty = "实际完成不能为空。";
|
||||
$lang->project->realEndNotFuture = "实际完成不能为未来日期。";
|
||||
$lang->project->realEndNotFuture = "实际完成不能大于当前日期。";
|
||||
|
||||
$lang->project->tenThousand = '万';
|
||||
|
||||
|
||||
@@ -1283,24 +1283,24 @@ class projectModel extends model
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
if($project->realEnd == '')
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->project->realEndNotEmpty;
|
||||
return false;
|
||||
}
|
||||
if($project->realEnd > $now)
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->project->realEndNotFuture;
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)->data($project)
|
||||
->autoCheck()
|
||||
->where('id')->eq((int)$projectID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
if($project->realEnd == '')
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->project->realEndNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($project->realEnd > $now)
|
||||
{
|
||||
dao::$errors['realEnd'] = $this->lang->project->realEndNotFuture;
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
$this->loadModel('score')->create('project', 'close', $oldProject);
|
||||
return common::createChanges($oldProject, $project);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</tr>
|
||||
<?php $this->printExtendFields($project, 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->realEndDate;?></th>
|
||||
<th><?php echo $lang->project->realEnd;?></th>
|
||||
<td>
|
||||
<div class='w-150px'>
|
||||
<?php echo html::input('realEnd',(!empty($project->realEnd) && $project->realEnd != '0000-00-00' ? $project->realEnd : date('Y-m-d')), "class='form-control form-date' required");?>
|
||||
|
||||
@@ -178,13 +178,13 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->project->begin;?></th>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
<th><?php echo $lang->project->realBegan;?></th>
|
||||
<th><?php echo $lang->project->realBeganAB;?></th>
|
||||
<td><?php echo $project->realBegan == '0000-00-00' ? '' : $project->realBegan;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->end;?></th>
|
||||
<td><?php echo $project->end;?></td>
|
||||
<th><?php echo $lang->project->realEnd;?></th>
|
||||
<th><?php echo $lang->project->realEndAB;?></th>
|
||||
<td><?php echo $project->realEnd == '0000-00-00' ? '' : $project->realEnd;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user