diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 6482699804..1c93972b9d 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -607,10 +607,8 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) { var shownIssues int if !isShowClosed { shownIssues = int(issueStats.OpenCount) - ctx.Data["TotalIssueCount"] = shownIssues } else { shownIssues = int(issueStats.ClosedCount) - ctx.Data["TotalIssueCount"] = shownIssues } if len(repoIDs) != 0 { shownIssues = 0 @@ -619,6 +617,12 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) { } } + var allIssueCount int64 + for _, issueCount := range issueCountByRepo { + allIssueCount += issueCount + } + ctx.Data["TotalIssueCount"] = allIssueCount + ctx.Data["IsShowClosed"] = isShowClosed ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = issue_service.GetRefEndNamesAndURLs(issues, ctx.FormString("RepoLink"))