ensure that the closed_at is set for closed issues#5449
Merged
Conversation
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: go-gitea#5446 Signed-off-by: Roman <romaaan.git@gmail.com>
2c65bfa to
8644320
Compare
Codecov Report
@@ Coverage Diff @@
## master #5449 +/- ##
=========================================
Coverage ? 37.56%
=========================================
Files ? 317
Lines ? 46824
Branches ? 0
=========================================
Hits ? 17588
Misses ? 26737
Partials ? 2499
Continue to review full report at Codecov.
|
lafriks
approved these changes
Dec 2, 2018
techknowlogick
approved these changes
Dec 2, 2018
Member
|
@romankl please send backport to release/v1.6 branch 😄 |
Author
|
@techknowlogick sure! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
right now the
closed_atfield for json responses is not filled during theAPIIssuecreation for api responses.For a closed issue you get a result like:
(truncated json)
which has no information about the closing date. (which exists in the db and ui)
With this PR the result changes to this:
(truncated json)
It includes now the correct
closed_atdate for closed issues.fixes: #5446