romankl 2d707fe5e6 ensure that the closed_at is set for closed (#5449)
right now the `closed_at` field for json responses is not filled during
the `APIIssue` creation for api responses.

For a closed issue you get a result like:
```json
"state":"open","comments":0,"created_at":"2018-11-29T16:39:24+01:00",
"updated_at":"2018-11-30T10:49:19+01:00","closed_at":null,
"due_date":null,"pull_request":null}
```
which has no information about the closing date. (which exists in the
db and ui)
with this PR the result changes to this:

```json
:null,"assignee":null,"assignees":null,
"state":"closed",
"comments":0,"created_at":"2018-11-29T16:43:05+01:00",
"updated_at":"2018-12-02T19:17:05+01:00",
"closed_at":"2018-12-02T19:17:05+01:00",
"due_date":null,"pull_request":null}
```

fixes: https://github.com/go-gitea/gitea/issues/5446
Signed-off-by: Roman <romaaan.git@gmail.com>
2018-12-02 15:43:01 -05:00
..
2018-03-06 09:22:16 +08:00
2017-05-26 09:38:18 +08:00
2017-05-04 13:54:56 +08:00
2018-10-27 22:45:24 +08:00
2018-05-09 19:29:04 +03:00
2018-05-21 10:28:29 +08:00
2014-04-13 03:14:43 -04:00
2018-08-23 18:42:02 -04:00
2018-10-25 18:55:16 +08:00
2018-10-29 09:48:37 -04:00
2017-10-27 09:10:54 +03:00
2018-10-26 12:37:57 +03:00
2018-05-19 17:12:37 +03:00
2018-05-19 17:12:37 +03:00
2018-10-23 10:57:42 +08:00
2018-07-26 19:38:55 +03:00
2018-10-20 18:19:21 -04:00
2018-10-19 12:36:42 -04:00