[PR #1942] [MERGED] Fix deleted milestone bug #16135

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1942
Author: @ethantkoenig
Created: 6/12/2017
Status: Merged
Merged: 6/17/2017
Merged by: @lunny

Base: masterHead: fix/delete_milestone


📝 Commits (3)

📊 Changes

3 files changed (+15 additions, -10 deletions)

View changed files

📝 models/issue_comment.go (+4 -10)
📝 options/locale/locale_en-US.ini (+1 -0)
📝 routers/repo/issue.go (+10 -0)

📄 Description

Fixes a bug where viewing an issue from a deleted milestone resulted in a 500 (because comments from that issue would still refer to the deleted milestone, which gitea would then try to load).

When deleting a milestone, delete all comments referencing that milestone.
Introduce "ghost" milestones (similar to "ghost" users) to fix the problem.


🔄 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/1942 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 6/12/2017 **Status:** ✅ Merged **Merged:** 6/17/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/delete_milestone` --- ### 📝 Commits (3) - [`2e5dee4`](https://github.com/go-gitea/gitea/commit/2e5dee44dbf7a8c4fae56e188258005fd1190d03) Fix deleted milestone bug - [`f816ff8`](https://github.com/go-gitea/gitea/commit/f816ff8177d8b6898168670e96a8a1c12cad18fd) Use locale for ghost milestone name - [`21a89e4`](https://github.com/go-gitea/gitea/commit/21a89e434bb4ad4835cb25349f62046089231d59) Fix pointer bug ### 📊 Changes **3 files changed** (+15 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `models/issue_comment.go` (+4 -10) 📝 `options/locale/locale_en-US.ini` (+1 -0) 📝 `routers/repo/issue.go` (+10 -0) </details> ### 📄 Description Fixes a bug where viewing an issue from a deleted milestone resulted in a 500 (because comments from that issue would still refer to the deleted milestone, which gitea would then try to load). ~When deleting a milestone, delete all comments referencing that milestone.~ Introduce "ghost" milestones (similar to "ghost" users) to fix the problem. --- <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:03:06 -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#16135