[PR #2204] [MERGED] Fix issue updated_unix bug #16286

Closed
opened 2025-11-02 12:06:45 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2204
Author: @ethantkoenig
Created: 7/23/2017
Status: Merged
Merged: 7/27/2017
Merged by: @lunny

Base: masterHead: fix/issue_updated_unix


📝 Commits (1)

  • 3c0f6d8 Fix issue updated_unix bug

📊 Changes

5 files changed (+73 additions, -0 deletions)

View changed files

📝 models/issue.go (+1 -0)
📝 models/issue_comment.go (+4 -0)
models/issue_comment_test.go (+41 -0)
📝 models/issue_test.go (+21 -0)
📝 models/unit_tests.go (+6 -0)

📄 Description

Fixes #1938.

The Issue.UpdatedUnix column is set in the BeforeUpdate() method. However, that write had no effect on the updated_unix column when updateIssueCols(..) was called, unless "updated_unix" was explicitly listed as a column to update.

This PR:

  • fixes updateIssueCols(..) to always update updated_unix.
  • updates createComment() to update an issue's updated_unix column when a comment is added.
  • includes relevant unit tests

🔄 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/2204 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 7/23/2017 **Status:** ✅ Merged **Merged:** 7/27/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/issue_updated_unix` --- ### 📝 Commits (1) - [`3c0f6d8`](https://github.com/go-gitea/gitea/commit/3c0f6d8bce576541c05b7b154b934a284f8c243a) Fix issue updated_unix bug ### 📊 Changes **5 files changed** (+73 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `models/issue.go` (+1 -0) 📝 `models/issue_comment.go` (+4 -0) ➕ `models/issue_comment_test.go` (+41 -0) 📝 `models/issue_test.go` (+21 -0) 📝 `models/unit_tests.go` (+6 -0) </details> ### 📄 Description Fixes #1938. The `Issue.UpdatedUnix` column is set in the `BeforeUpdate()` method. However, that write had no effect on the `updated_unix` column when `updateIssueCols(..)` was called, unless `"updated_unix"` was explicitly listed as a column to update. This PR: - fixes `updateIssueCols(..)` to always update `updated_unix`. - updates `createComment()` to update an issue's `updated_unix` column when a comment is added. - includes relevant unit tests --- <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 12:06:45 -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#16286