* fix bug for batch edit task.
This commit is contained in:
@@ -349,6 +349,7 @@ class storyModel extends model
|
||||
if(empty($field)) continue;
|
||||
if($type == 'requirement' and $field == 'plan') continue;
|
||||
|
||||
if(!isset($story->$field)) continue;
|
||||
if(!empty($story->$field)) continue;
|
||||
if($field == 'estimate' and strlen(trim($story->estimate)) != 0) continue;
|
||||
|
||||
|
||||
@@ -390,6 +390,7 @@ class task extends control
|
||||
if($this->post->names)
|
||||
{
|
||||
$allChanges = $this->task->batchUpdate();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
if(!empty($allChanges))
|
||||
{
|
||||
|
||||
@@ -329,6 +329,7 @@ class taskModel extends model
|
||||
$field = trim($field);
|
||||
if(empty($field)) continue;
|
||||
|
||||
if(!isset($task->$field)) continue;
|
||||
if(!empty($task->$field)) continue;
|
||||
if($field == 'estimate' and strlen(trim($task->estimate)) != 0) continue;
|
||||
|
||||
@@ -1063,6 +1064,7 @@ class taskModel extends model
|
||||
$field = trim($field);
|
||||
if(empty($field)) continue;
|
||||
|
||||
if(!isset($task->$field)) continue;
|
||||
if(!empty($task->$field)) continue;
|
||||
if($field == 'estimate' and strlen(trim($task->estimate)) != 0) continue;
|
||||
|
||||
@@ -1071,8 +1073,9 @@ class taskModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
foreach($tasks as $task)
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
$oldTask = $oldTasks[$taskID];
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user