[PR #5449] [MERGED] ensure that the closed_at is set for closed issues #17800

Closed
opened 2025-11-02 15:53:10 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5449
Author: @r-52
Created: 12/2/2018
Status: Merged
Merged: 12/2/2018
Merged by: @techknowlogick

Base: masterHead: r-fix-json-issue-info


📝 Commits (1)

  • 8644320 ensure that the closed_at is set for closed

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 models/issue.go (+4 -0)

📄 Description

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: https://github.com/go-gitea/gitea/issues/5446


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/5449 **Author:** [@r-52](https://github.com/r-52) **Created:** 12/2/2018 **Status:** ✅ Merged **Merged:** 12/2/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `r-fix-json-issue-info` --- ### 📝 Commits (1) - [`8644320`](https://github.com/go-gitea/gitea/commit/8644320bf50b06167730554b2a473085a1fa5435) ensure that the `closed_at` is set for closed ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `models/issue.go` (+4 -0) </details> ### 📄 Description 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)_ ```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)_ ```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: https://github.com/go-gitea/gitea/issues/5446 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 15:53:10 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17800