* Fix bug #18083.
This commit is contained in:
@@ -246,7 +246,8 @@ $lang->task->error->finishedDateEmpty = '"Finished Date" should not be empty.';
|
||||
$lang->task->error->finishedDateSmall = '"Finished Date" should be > "Real Started"';
|
||||
$lang->task->error->alreadyConsumed = 'The currently selected parent task has been consumed.';
|
||||
$lang->task->error->date = 'The date should be >= today.';
|
||||
$lang->task->error->statusLeft = 'When the task status is %s, "Hours Left" cannot be 0';
|
||||
$lang->task->error->leftEmpty = 'When the task status is %s, "Hours Left" cannot be 0';
|
||||
$lang->task->error->leftEmptyAB = 'task#%sWhen the task status is %s, "Hours Left" cannot be 0';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
@@ -246,7 +246,8 @@ $lang->task->error->finishedDateEmpty = '实际完成不能为空';
|
||||
$lang->task->error->finishedDateSmall = '实际完成不能小于实际开始';
|
||||
$lang->task->error->alreadyConsumed = '当前选中的父任务已有消耗。';
|
||||
$lang->task->error->date = '日期不能大于今天';
|
||||
$lang->task->error->statusLeft = '任务状态为%s时,预计剩余不能为0';
|
||||
$lang->task->error->leftEmpty = '任务状态为%s时,预计剩余不能为0';
|
||||
$lang->task->error->leftEmptyAB = 'task#%s任务状态为%s时,预计剩余不能为0';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
@@ -1000,7 +1000,7 @@ class taskModel extends model
|
||||
|
||||
if(strpos(',done,wait,cancel,closed,', $task->status) === false && empty($teams) && $task->left == 0)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->task->error->statusLeft, $this->lang->task->statusList[$task->status]);
|
||||
dao::$errors[] = sprintf($this->lang->task->error->leftEmpty, $this->lang->task->statusList[$task->status]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1280,6 +1280,11 @@ class taskModel extends model
|
||||
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
if(strpos(',done,wait,cancel,closed,', $task->status) === false && empty($teams) && $task->parent > 0 && $task->consumed != 0)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->task->error->leftEmptyAB, $taskID, $this->lang->task->statusList[$task->status]);
|
||||
return false;
|
||||
}
|
||||
$oldTask = $oldTasks[$taskID];
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
@@ -1287,7 +1292,6 @@ class taskModel extends model
|
||||
->checkIF($task->estimate != false, 'estimate', 'float')
|
||||
->checkIF($task->consumed != false, 'consumed', 'float')
|
||||
->checkIF($task->left != false, 'left', 'float')
|
||||
->checkIF($task->parent > 0 and $task->left == 0 and $task->status != 'cancel' and $task->status != 'closed' and $task->status != 'wait' and $task->consumed != 0, 'status', 'equal', 'done')
|
||||
|
||||
->batchCheckIF($task->status == 'wait' or $task->status == 'doing', 'finishedBy, finishedDate,canceledBy, canceledDate, closedBy, closedDate, closedReason', 'empty')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user