forgejo/models/issues
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
..
assignees.go
assignees_test.go
comment.go Fix issues count bug (#21600) 2022-10-26 20:42:45 +08:00
comment_list.go
comment_test.go
content_history.go
content_history_test.go
dependency.go
dependency_test.go
issue.go Fix issue/PR numbers (#22037) (#22045) 2022-12-06 22:15:38 +08:00
issue_index.go
issue_list.go Display project in issue list (#20583) 2022-08-02 17:14:31 +03:00
issue_list_test.go
issue_lock.go
issue_project.go Fix missed sort bug (#21006) 2022-08-31 23:40:29 +08:00
issue_test.go
issue_user.go
issue_user_test.go
issue_watch.go
issue_watch_test.go
issue_xref.go
issue_xref_test.go
label.go Fix org label open count, including close count issue (#20364) 2022-07-14 03:42:46 +01:00
label_test.go
main_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
milestone.go Modify milestone search keywords to be case insensitive (#20266) (#20498) 2022-07-27 19:55:09 +08:00
milestone_test.go
pull.go Fix checks in PR for empty commits (#20290) (#20352) 2022-07-13 18:36:23 +01:00
pull_list.go
pull_test.go
reaction.go Fix reaction of issues (#21185) (#21196) 2022-09-18 12:04:09 +08:00
reaction_test.go
review.go Dismiss prior pull reviews if done via web in review dismiss (#20197) (#20407) 2022-07-19 17:46:33 +02:00
review_test.go
stopwatch.go
stopwatch_test.go
tracked_time.go
tracked_time_test.go