Wrong summary of milestone progress (>100% completion possible) #3888

Closed
opened 2025-11-02 05:29:42 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @manuelmohr on GitHub (Sep 3, 2019).

  • Gitea version (or commit ref): 1.9.2
  • Git version: 2.17.1
  • Operating system: Ubuntu Linux 18.04.3 LTS
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Milestone progress summary is broken if pull requests state that they fix an issue, and both issue and pull request are assigned to the milestone (see screenshots below).

Perform the following steps to reproduce:

  • Create a milestone.
  • Create an issue and assign it to the milestone (let's say it's issue #⁠1).
  • Create a pull request with a commit whose commit message contains "This fixes #⁠1."
  • Assign the pull request to the milestone.
  • Merge the pull request.

Expected output:

  • Milestone is at 100% progress, 2/2 closed.

Actual output:

  • Milestone is at 150% progress, 3/2 closed, with -1 open remaining.

With more PRs and issues created, you can create arbitrarily weird completion numbers, e.g., 100% progress with multiple issues and PRs still open.

It seems as if something is counted twice (maybe the PR that also fixes an issue?).

Screenshots

image

image

Originally created by @manuelmohr on GitHub (Sep 3, 2019). - Gitea version (or commit ref): 1.9.2 - Git version: 2.17.1 - Operating system: Ubuntu Linux 18.04.3 LTS - Database: - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description Milestone progress summary is broken if pull requests state that they fix an issue, and both issue and pull request are assigned to the milestone (see screenshots below). Perform the following steps to reproduce: - Create a milestone. - Create an issue and assign it to the milestone (let's say it's issue #⁠1). - Create a pull request with a commit whose commit message contains "This fixes #⁠1." - Assign the pull request to the milestone. - Merge the pull request. Expected output: - Milestone is at 100% progress, 2/2 closed. Actual output: - Milestone is at 150% progress, 3/2 closed, with -1 open remaining. With more PRs and issues created, you can create arbitrarily weird completion numbers, e.g., 100% progress with multiple issues and PRs still open. It seems as if something is counted twice (maybe the PR that also fixes an issue?). ## Screenshots ![image](https://user-images.githubusercontent.com/3143777/64181135-415b4f80-ce66-11e9-98f3-68b6d0151988.png) ![image](https://user-images.githubusercontent.com/3143777/64181320-88494500-ce66-11e9-82e8-fa8dc38de9db.png)
GiteaMirror added the type/bug label 2025-11-02 05:29:42 -06:00
Author
Owner

@6543 commented on GitHub (Oct 3, 2019):

link PR https://github.com/go-gitea/gitea/pull/8221

@6543 commented on GitHub (Oct 3, 2019): link PR https://github.com/go-gitea/gitea/pull/8221
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3888