Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues count bug #21557

Merged
merged 15 commits into from
Oct 25, 2022
Merged

Fix issues count bug #21557

merged 15 commits into from
Oct 25, 2022

Conversation

lunny
Copy link
Member

@lunny lunny commented Oct 23, 2022

Should fix #19349 , #19505

@lunny lunny added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. backport/v1.17 labels Oct 23, 2022
@lunny lunny added this to the 1.18.0 milestone Oct 23, 2022
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 23, 2022
models/repo/repo.go Outdated Show resolved Hide resolved
models/repo/repo.go Outdated Show resolved Hide resolved
models/repo/repo.go Outdated Show resolved Hide resolved
models/repo/repo.go Show resolved Hide resolved
models/repo/repo.go Outdated Show resolved Hide resolved
@lunny
Copy link
Member Author

lunny commented Oct 24, 2022

@delvh done.

@lunny
Copy link
Member Author

lunny commented Oct 24, 2022

It should not be fixed. You have no more tests so that you cannot encounter it.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 24, 2022
@GiteaBot GiteaBot removed the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 25, 2022
@GiteaBot GiteaBot added the lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. label Oct 25, 2022
@6543 6543 merged commit 5e8e3ec into go-gitea:main Oct 25, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 25, 2022
* upstream/main:
  Fix issues count bug (go-gitea#21557)
  Improve code comment review on mobile (go-gitea#21461)
  Consolidate remaining colors into variables (go-gitea#21582)
@lunny lunny deleted the lunny/fix_issues_counter branch October 26, 2022 09:13
@lunny lunny mentioned this pull request Oct 26, 2022
@lunny lunny added the backport/done All backports for this PR have been created label Oct 26, 2022
lunny added a commit that referenced this pull request Oct 26, 2022
@wolfogre wolfogre mentioned this pull request Dec 5, 2022
lunny pushed a commit that referenced this pull request Dec 6, 2022
When deleting a closed issue, we should update both `NumIssues`and
`NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`)
will be wrong. It's the same for pull requests.

Releated to #21557.

Alse fixed two harmless problems:

- The SQL to check issue/PR total numbers is wrong, that means it will
update the numbers even if they are correct.
- Replace legacy `num_issues = num_issues + 1` operations with
`UpdateRepoIssueNumbers`.
lunny pushed a commit that referenced this pull request Dec 6, 2022
Backport #22037.

When deleting a closed issue, we should update both `NumIssues`and
`NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`)
will be wrong. It's the same for pull requests.

Releated to #21557.

Alse fixed two harmless problems:

- The SQL to check issue/PR total numbers is wrong, that means it will
update the numbers even if they are correct.
- Replace legacy `num_issues = num_issues + 1` operations with
`UpdateRepoIssueNumbers`.
lunny added a commit that referenced this pull request Dec 7, 2022
Backport #22037.

When deleting a closed issue, we should update both `NumIssues`and
`NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`)
will be wrong. It's the same for pull requests.

Releated to #21557.

Alse fixed two harmless problems:

- The SQL to check issue/PR total numbers is wrong, that means it will
update the numbers even if they are correct.
- Replace legacy `num_issues = num_issues + 1` operations with
`UpdateRepoIssueNumbers`.

Co-authored-by: Lunny Xiao <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull Request counter offset after deleting branch
4 participants