opf/openproject — pull request #2155 by oliverguenther (2014-11-06 10:01:55+00:00)
Title: TimeEntries spent_on date display bug.

The detail view of logged time entries does not show the logged date
(spent_on), but instead displays the current time.

I believe this is an error in the data passing in the angular scope. The parameter ``scope.dateValue`` is empty, and thus undefined is passed to

```
scope.date = TimezoneService.formattedDate(scope.dateValue);
```
which in turn results in the date always set to today.
The issue appears to be fixed when adding a data observer to the custom directive.

The following example contains a time entry with ``spent_on`` set to 2014-11-02:

![Edit date correct](https://dl.dropboxusercontent.com/u/270758/op_spent_on_fe.png)

yet, the detail view shows the current date.

![Displays incorrectly](https://dl.dropboxusercontent.com/u/270758/op_spent_on_f.png)

This commit appears to fix the issue. Angular isn't one of my strong suits, so maybe this isn't the correct / optimal solution, even though it fixes the error.

I've also added this as a work package at https://community.openproject.org/work_packages/17222