* Finish task#7109.
This commit is contained in:
@@ -728,6 +728,7 @@ class task extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->task->recordEstimate($taskID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
/* Remind whether to update status of the bug, if task which from that bug has been finished. */
|
||||
$task = $this->task->getById($taskID);
|
||||
|
||||
@@ -198,6 +198,7 @@ $lang->task->createDenied = '你不能在该项目添加任务';
|
||||
$lang->task->cannotDeleteParent = '不能删除父任务。';
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
$lang->task->error->totalNumber = '"总计消耗"必须为数字';
|
||||
$lang->task->error->consumedNumber = '"本次消耗"必须为数字';
|
||||
$lang->task->error->estimateNumber = '"预计剩余"必须为数字';
|
||||
$lang->task->error->recordMinus = '工时不能为负数';
|
||||
|
||||
+19
-1
@@ -1205,7 +1205,25 @@ class taskModel extends model
|
||||
*/
|
||||
public function recordEstimate($taskID)
|
||||
{
|
||||
$record = fixer::input('post')->get();
|
||||
$record = fixer::input('post')->get();
|
||||
foreach($record->consumed as $item)
|
||||
{
|
||||
if(!is_numeric($item))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->totalNumber;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($record->left as $item)
|
||||
{
|
||||
if(!is_numeric($item))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->estimateNumber;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$estimates = array();
|
||||
$task = $this->getById($taskID);
|
||||
$earliestTime = '';
|
||||
|
||||
Reference in New Issue
Block a user