forgejo/services/issue
Jason Song e93a4a0174
Fix issue/PR numbers (#22037) (#22045)
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`.
2022-12-06 22:15:38 +08:00
..
assignee.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
assignee_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
commit.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
commit_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
content.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
issue.go Fix issue/PR numbers (#22037) (#22045) 2022-12-06 22:15:38 +08:00
issue_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
label.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
label_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
main_test.go Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
milestone.go Check if project has the same repository id with issue when assign project to issue (#20133) (#20188) 2022-07-01 15:00:05 +02:00
milestone_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
status.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00