Skip to content

ensure that the closed_at is set for closed issues#5449

Merged
techknowlogick merged 1 commit into
go-gitea:masterfrom
r-52:r-fix-json-issue-info
Dec 2, 2018
Merged

ensure that the closed_at is set for closed issues#5449
techknowlogick merged 1 commit into
go-gitea:masterfrom
r-52:r-fix-json-issue-info

Conversation

@r-52
Copy link
Copy Markdown

@r-52 r-52 commented Dec 2, 2018

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:
(truncated 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:

(truncated json)

"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}

It includes now the correct closed_at date for closed issues.

fixes: #5446

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>
@r-52 r-52 force-pushed the r-fix-json-issue-info branch from 2c65bfa to 8644320 Compare December 2, 2018 20:00
@codecov-io
Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@ce4885f). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5449   +/-   ##
=========================================
  Coverage          ?   37.56%           
=========================================
  Files             ?      317           
  Lines             ?    46824           
  Branches          ?        0           
=========================================
  Hits              ?    17588           
  Misses            ?    26737           
  Partials          ?     2499
Impacted Files Coverage Δ
models/issue.go 48.4% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce4885f...8644320. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 2, 2018
@lafriks lafriks added this to the 1.7.0 milestone Dec 2, 2018
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 2, 2018
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 2, 2018
@techknowlogick techknowlogick merged commit 2d707fe into go-gitea:master Dec 2, 2018
@techknowlogick
Copy link
Copy Markdown
Member

@romankl please send backport to release/v1.6 branch 😄

@r-52
Copy link
Copy Markdown
Author

r-52 commented Dec 2, 2018

@techknowlogick sure!

@r-52 r-52 deleted the r-fix-json-issue-info branch December 2, 2018 20:49
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Dec 2, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web API: closed_at field null even though ticket is closed.

5 participants