diff --git a/include/class.task.php b/include/class.task.php index ed8b5a0897a11c96cab6615f6567a4b0c5e79dbf..55671d1af58b9ac43cb9939bd94ecaf5b95f8df7 100644 --- a/include/class.task.php +++ b/include/class.task.php @@ -170,8 +170,7 @@ class TaskModel extends VerySimpleModel { } function getCloseDate() { - // TODO: have true close date - return $this->isClosed() ? $this->updated : ''; + return $this->isClosed() ? $this->closed : ''; } function isOpen() { diff --git a/include/staff/templates/task-preview.tmpl.php b/include/staff/templates/task-preview.tmpl.php index e4488321071b78103592d951978a53fe4212745d..e1f32892c94ce791f7d90979920a2e885e1a6286 100644 --- a/include/staff/templates/task-preview.tmpl.php +++ b/include/staff/templates/task-preview.tmpl.php @@ -48,7 +48,16 @@ echo sprintf(' </tr>',$status, Format::datetime($task->getCreateDate())); -if ($task->isOpen() && $task->duedate) { +if ($task->isClosed()) { + + echo sprintf(' + <tr> + <th>'.__('Completed').':</th> + <td>%s</td> + </tr>', + Format::datetime($task->getCloseDate())); + +} elseif ($task->isOpen() && $task->duedate) { echo sprintf(' <tr> <th>'.__('Due Date').':</th> diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php index 2d7873c9375d66cd3c2811a86c7003d61e2f81ce..326576acf91db6f991bcb776c44ec69563e3c271 100644 --- a/include/staff/templates/task-view.tmpl.php +++ b/include/staff/templates/task-view.tmpl.php @@ -178,7 +178,7 @@ if (!$ticket) { ?> </tr> <tr> - <th><?php echo __('Create Date');?>:</th> + <th><?php echo __('Created');?>:</th> <td><?php echo Format::datetime($task->getCreateDate()); ?></td> </tr> <?php @@ -192,7 +192,7 @@ if (!$ticket) { ?> <?php }else { ?> <tr> - <th><?php echo __('Close Date');?>:</th> + <th><?php echo __('Completed');?>:</th> <td><?php echo Format::datetime($task->getCloseDate()); ?></td> </tr> <?php