* Fix bug #15183.
This commit is contained in:
@@ -385,9 +385,9 @@ class task extends control
|
||||
$task = $this->task->getById($taskID);
|
||||
if($this->post->comment != '' or !empty($changes) or !empty($files))
|
||||
{
|
||||
$action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented';
|
||||
$action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented';
|
||||
$fileAction = !empty($files) ? $this->lang->addFiles . join(',', $files) . "\n" : '';
|
||||
$actionID = $this->action->create('task', $taskID, $action, $fileAction . $this->post->comment);
|
||||
$actionID = $this->action->create('task', $taskID, $action, $fileAction . $this->post->comment);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
|
||||
@@ -848,8 +848,7 @@ class taskModel extends model
|
||||
$now = helper::now();
|
||||
$task = fixer::input('post')
|
||||
->setDefault('story, estimate, left, consumed', 0)
|
||||
->setDefault('estStarted', '0000-00-00')
|
||||
->setDefault('deadline', '0000-00-00')
|
||||
->setDefault('realStarted', '0000-00-00 00:00:00')
|
||||
->setIF(is_numeric($this->post->estimate), 'estimate', (float)$this->post->estimate)
|
||||
->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed)
|
||||
->setIF(is_numeric($this->post->left), 'left', (float)$this->post->left)
|
||||
@@ -1922,7 +1921,7 @@ class taskModel extends model
|
||||
if($task->assignedTo == 'closed') $task->assignedToRealName = 'Closed';
|
||||
foreach($task as $key => $value)
|
||||
{
|
||||
if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $task->$key = '';
|
||||
if((strpos($key, 'Date') !== false or strpos('estStarted|deadline', $key) !== false) and !(int)substr($value, 0, 4)) $task->$key = '';
|
||||
}
|
||||
$task->files = $this->loadModel('file')->getByObject('task', $taskID);
|
||||
|
||||
|
||||
@@ -176,11 +176,11 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->task->estStarted;?></th>
|
||||
<td><?php echo html::input('estStarted', helper::isZeroDate($task->estStarted) ? '' : $task->estStarted, "class='form-control form-date'");?></td>
|
||||
<td><?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->deadline;?></th>
|
||||
<td><?php echo html::input('deadline', helper::isZeroDate($task->deadline) ? '' : $task->deadline, "class='form-control form-date'");?></td>
|
||||
<td><?php echo html::input('deadline', $task->deadline, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->estimate;?></th>
|
||||
|
||||
Reference in New Issue
Block a user