gitea/services/issue
Jason Song c0ca9c612b
Fix issue/PR numbers (#22037) (#22044)
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 <xiaolunwen@gmail.com>
2022-12-07 14:20:12 +08:00
..
assignee_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
assignee.go Allow poster to choose reviewers (#21084) 2022-09-09 18:27:47 +01:00
commit_test.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
commit.go Add generic set type (#21408) 2022-10-12 13:18:26 +08:00
content.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
issue_test.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
issue.go Fix issue/PR numbers (#22037) (#22044) 2022-12-07 14:20:12 +08:00
label_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
label.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_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
milestone.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
status.go Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00