* finish task #2783.

This commit is contained in:
wangyidong
2016-12-01 15:36:25 +08:00
parent e472df69de
commit 75c4c563f5
5 changed files with 6 additions and 10 deletions
-1
View File
@@ -91,7 +91,6 @@ $lang->task->deleteEstimate = 'Delete Man-Hour';
$lang->task->colorTag = 'Color Tag';
$lang->task->files = 'Files';
$lang->task->hasConsumed = 'Total Consumed';
$lang->task->thisConsume = 'This Consumed';
$lang->task->ditto = 'Ditto';
$lang->task->dittoNotice = "This Task does not belong to the Project as the previous one does!";
-1
View File
@@ -91,7 +91,6 @@ $lang->task->deleteEstimate = '删除工时';
$lang->task->colorTag = '颜色标签';
$lang->task->files = '附件';
$lang->task->hasConsumed = '已消耗';
$lang->task->thisConsume = '本次消耗';
$lang->task->ditto = '同上';
$lang->task->dittoNotice = "该任务与上一任务不属于同一项目!";
+3 -5
View File
@@ -653,10 +653,9 @@ class taskModel extends model
->setDefault('status', 'done')
->setDefault('finishedBy, lastEditedBy', $this->app->user->account)
->setDefault('finishedDate, lastEditedDate', $now)
->remove('comment,files,labels,thisConsume')
->remove('comment,files,labels')
->get();
if($task->finishedDate == substr($now, 0, 10)) $task->finishedDate = $now;
if(!isset($task->consumed)) $task->consumed = $oldTask->consumed + $this->post->thisConsume;
if(!is_numeric($task->consumed)) die(js::error($this->lang->task->error->consumedNumber));
@@ -668,7 +667,7 @@ class taskModel extends model
->setDefault('task', $taskID)
->setDefault('date', date(DT_DATE1))
->setDefault('left', 0)
->remove('finishedDate,comment,assignedTo,files,labels,consumed,thisConsume')
->remove('finishedDate,comment,assignedTo,files,labels,consumed')
->get();
$estimate->consumed = $consumed;
if($estimate->consumed) $this->addTaskEstimate($estimate);
@@ -813,8 +812,7 @@ class taskModel extends model
$task->files = $this->loadModel('file')->getByObject('task', $taskID);
/* Get related test cases. */
$cases = $this->dao->select('id, title')->from(TABLE_CASE)->where('story')->eq($task->story)->andWhere('storyVersion')->eq($task->storyVersion)->fetchPairs();
if($cases) $task->cases = $cases;
if($task->story)$this->cases = $this->dao->select('id, title')->from(TABLE_CASE)->where('story')->eq($task->story)->andWhere('storyVersion')->eq($task->storyVersion)->fetchPairs();
return $this->processTask($task);
}
+2 -2
View File
@@ -27,8 +27,8 @@
<td class='w-p25-f'> <?php echo $task->consumed;?> <?php echo $lang->workingHour;?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->task->thisConsume;?></th>
<td><div class='input-group'><?php echo html::input('thisConsume', 0, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td>
<th><?php echo $lang->task->consumed;?></th>
<td><div class='input-group'><?php echo html::input('consumed', $task->consumed, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td>
</tr>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
+1 -1
View File
@@ -28,7 +28,7 @@
<td class='w-p25-f'><div class='datepicker-wrapper datepicker-date'><?php echo html::input('realStarted', $task->realStarted == '0000-00-00' ? helper::today() : $task->realStarted, "class='form-control form-date'");?></div></td><td></td>
</tr>
<tr>
<th><?php echo $lang->task->thisConsume;?></th>
<th><?php echo $lang->task->consumed;?></th>
<td><div class='input-group'><?php echo html::input('consumed', $task->consumed, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td><td></td>
</tr>
<tr>