Skip to content

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

Closed
@manuelmohr

Description

@manuelmohr
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions