* fix the bug of batchcreate of task.

This commit is contained in:
chencongzhi520@gmail.com
2012-09-03 02:20:24 +00:00
parent e662c95672
commit c0c15e3cc4
2 changed files with 4 additions and 3 deletions

View File

@@ -90,9 +90,10 @@ class taskModel extends model
{
$now = helper::now();
$tasks = fixer::input('post')->get();
$mails = array();
for($i = 0; $i < $this->config->task->batchCreate; $i++)
{
if($tasks->type[$i] != '' and $tasks->name[$i] != '' and $tasks->pri[$i] != 0 and $tasks->estimate[$i] != '')
if($tasks->type[$i] != '' and $tasks->name[$i] != '' and $tasks->pri[$i] != 0)
{
$data[$i]->story = $tasks->story[$i] != 'ditto' ? $tasks->story[$i] : ($i == 0 ? 0 : $data[$i-1]->story);
$data[$i]->type = $tasks->type[$i] == 'ditto' ? ($i == 0 ? '' : $data[$i-1]->type) : $tasks->type[$i];

View File

@@ -21,8 +21,8 @@
<th><?php echo $lang->task->story;?></th>
<th class='red'><?php echo $lang->task->name;?></th>
<th class='w-60px red'><?php echo $lang->typeAB;?></th>
<th class='w-80px red'><?php echo $lang->task->assignedTo;?></th>
<th class='w-50px red'><?php echo $lang->task->estimateAB;?></th>
<th class='w-80px'><?php echo $lang->task->assignedTo;?></th>
<th class='w-50px'><?php echo $lang->task->estimateAB;?></th>
<th class='w-200px'><?php echo $lang->task->desc;?></th>
<th class='w-50px'><?php echo $lang->task->pri;?></th>
</tr>